The battered "Caine" returns to San Francisco, where Maryk and Keith face a court-martial for mutiny. Wounded naval aviator Barney Greenwald, a lawyer in civilian life, reluctantly becomes Maryk's defense counsel after eight Navy lawyers turn down the assignment. At the court-martial, Keefer lies on the stand, claiming he never observed any mental illness in Queeg and never counseled Maryk to relieve him. A Navy psychiatrist testifies that Queeg is fit for command, but during Greenwald's questioning confirms that Queeg shows symptoms of a paranoid personality. Under Greenwald's relentless cross-examination, Queeg exhibits odd behavior on the stand – which he himself eventually realizes reflects badly on him – and Maryk is acquitted. Following the acquittal, the officers of the "Caine" hold a party, where Keefer receives a frosty reception from Maryk. A drunken Greenwald arrives and berates the officers for not appreciating Queeg's long service and failing to give him the support he asked for. He denounces Keefer as the real "author" of the mutiny, a man who "hated the Navy" and manipulated others while keeping his own hands clean. He then throws a glass of champagne in Keefer's face and departs, followed by the rest of the officers, leaving Keefer alone in the room. After the court-martial, Keith is assigned to a new destroyer commanded by the "Caine's" first captain, Commander De Vriess. Uncredited   Herman Wouk had already adapted his novel as a stage play, "The Caine Mutiny Court-Martial", which premiered on Broadway in January 1954 and ran for more than a year. The play was directed by Charles Laughton and was a critical as well as a commercial success. Wouk was initially selected to write the screenplay, but director Dmytryk thought his work was not successful. He replaced the novelist with Stanley Roberts, an experienced screenwriter. Roberts later quit the production after being told to cut the screenplay so the film could be kept to two hours. The 50 pages worth of cuts were made by Michael Blankfort, who received an "additional dialog" credit. The film differs from the novel, which focused on the Keith character, who became secondary in the film. The film instead focuses on Queeg. Kramer "mollified the Navy" by modifying the Queeg characterization to make him less of a madman, as portrayed by Wouk, and more a victim of battle fatigue.