LAGOS, Nigeria (AP) _ Two British aircraft engineers were released from Kirikiri Prison near Lagos today after being held for 25 months on charges of stealing a private executive jet.

Kenneth Clark, 39, and Angus Paterson, 41, both of Scotland, were freed one day after a federal appeals court overturned their convictions and called them victims of ''a substantial miscarriage of justice.''

Clark and Paterson were convicted in October 1984 on charges of conspiracy and theft following a failed attempt to repossess a Hawker Siddley 125 aircraft sold to a Nigerian.

On Thursday, the appeals court ruled the British firm of Shirlston Transport Services legally owned the jet and was entitled to repossess it because the Nigerian defaulted on payments.

The Paterson and Clark convictions followed a botched attempt in July 1984 by agents of Nigeria's military government to kidnap former Transport Minister Umaru Dikko and smuggle him back to Lagos to face corruption charges. The episode strained relations between Britain and its former colony.

The two engineers said today they were happy about being free, but would be happier when they arrived home, by early Saturday.

Prison officials had refused to release the men immediately without clearance from the federal military government.

But the chief of the military general staff, Commodore Ebitu Ukiwe, today lifted an order detaining the two on grounds of state security. Justice Minister Bola Ajibola handed them over to two officials of the British High Commission.

Clark said they were never beaten, but that prison life was ''not very good.'' He said he had malaria and that medical care in prison was unreliable.