They were childhood friends who collaborated on five films, including one of cinema’s most powerful anti-war movies, Paths of Glory. But Stanley Kubrick refused to pay Gerald Fried for the music he wrote for their first film, the composer has now revealed.

That film was the 1951 Day of the Fight, a short documentary following a day in the life of middleweight Irish boxer Walter Cartier.

Fried said: “He thought the very fact that my doing the music to his early movies got me into the profession was enough payment. We had an agreement – not in writing – [that] we would work for nothing but, as soon as the movie got sold, he would pay us. Well, he didn’t. He gave us this rationale: ‘I did you a much better service than paying you, I got you into the movie business’. Which is true.”

Fried was speaking after identifying himself as the owner of a lost Kubrick screenplay, whose discovery came to light in July. He is selling it through Bonhams New York on 20 November, along with some letters from the film director.

Commenting on Kubrick’s mean-spirited streak, Professor Nathan Abrams of Bangor University, a leading Kubrick expert, said: “He was known for keeping his eye very closely on the bottom line. He had control of all the financial aspects of his films.”

Fried did at least get paid for their other films, which include the 1956 crime heist The Killing.

Recalling his high-school days with Kubrick, Fried said: “Stanley couldn’t quite fit in. As a child, he felt a combination of, ‘I am smarter, more talented and better than everybody’ and ‘I am inferior to you all because I’m not a regular kind of person’. That, I think, dominated him.”

Kubrick, an American who lived most of his life in Britain, died in 1999. The lost screenplay, an story of adultery entitled Burning Secret, is so close to completion that it could be developed by contemporary film-makers. It is an adaptation of the 1913 novella by the Viennese writer Stefan Zweig.

MGM is believed to have cancelled the project after learning that Kubrick was also working, in breach of contract, on Paths of Glory. Abrams suggests that it may have been too risque.

Asked about Kubrick’s approach to music, Fried said: “For Day of the Fight and the other ones, he didn’t know much about music, so he kept his mouth shut. By the time he got to Paths of Glory, I had to justify every note. It was quite a tortuous process. But, then again, he was a great movie-maker, so maybe that’s one of the reasons why.”