A factory worker who stole restricted documents about British nuclear submarines and tried to sell them to an eastern European government has been jailed for four and a half years.

Marcin Kostrzewa, 32, went to the Polish embassy and offered documents and other material for £50,000, but officials tipped off British secret services and he was caught in a sting operation.

During his trial at Plymouth crown court, the Polish national claimed that he hatched the plot to steal the documents from a neighbour because it would provide him with material for a comedy spy thriller he planned to write. But the jury took less than an hour to convict him of burglary.

Recorder John Williams said he was not the “bumbling fool” he portrayed himself as but a “calculating and clever” man.

Kostrzewa broke into the flat of Shane Spencer, who worked as an engineer for the company Babcock at the naval base in Devonport, Plymouth. From time to time Spencer took home documents to work on, and sometimes stored them in his airing cupboard.

Kostrzewa took the documents and contacted the Polish embassy. In April last year, a British secret services agent called “Alex” met Kostrzewa in a hotel room rigged with hidden recording devices. Believing that “Alex” was a Polish spy, Kostrzewa said he wanted £50,000 for the information and told the agent: “This is only the beginning.”

The judge said the Pole realised the documents were restricted and that the release of that information could affect British military operations and cause stress to 25-year-old Spencer, who did not know they had been taken until the police told him.

Spencer told the court he had been “subjected to embarrassment and gossip” after he was suspended by Babcock in April 2014 and he later resigned. He had lost the chance of landing a “dream job” because of the case and felt that his future had been jeopardised by his neighbour’s actions.

Spencer said he was hoping for a fresh start abroad as he waited for his high-level security clearance to be resolved following his suspension.

The court heard that Kostrzewa had previous convictions in Poland, where he had served jail terms for burglary, robbery, perverting the course of justice and extortion.