The Sun and the Daily Mirror were found guilty of contempt of court for publishing a series of "extreme" articles about a suspect who had been arrested by police investigating the murder of the landscape architect Joanna Yeates.

The Daily Mirror was fined £50,000 and the Sun £18,000 after the high court ruled that the papers posed a "substantial risk" to the course of justice in their reporting on the arrest of Christopher Jefferies, Yeates's landlord, who was later released without charge and was entirely innocent of any involvement.

The Daily Mirror fine is the biggest against a British newspaper for contempt since 2004, when the Daily Star was fined £60,000 for revealing the identities of two Premiership footballers at the centre of high-profile gang rape allegations.

In a separate legal action eight national newspapers, including the Daily Mirror and Sun, collectively paid six-figure libel damages to Jefferies following allegations made about him in January, when the police hunt for Yeates's killer was at its height.

In a written judgment on the contempt of court action handed down at the high court, the Lord Chief Justice, Lord Judge, Lord Justice Thomas and Mr Justice Owen described the Daily Mirror articles as "extreme" and "substantial risks to the course of justice". The judges said the Sun's coverage of Jefferies created a "very serious risk" that any future court defence would be damaged.

Lord Judge said: "The articles in the one issue of the Sun were written and laid out in such a way that they would have conveyed to the reader of the front page and the two inside pages over which the stories were spread that he was a stalker, with an obsession with death, who let himself into the flats of other occupants of the building where Miss Yeates lived, and that he had an unhealthy interest in blond young women."

The court gave the Daily Mirror publisher Mirror Group Newspapers extended time in which to launch a petition for permission to appeal to the supreme court.

Vincent Tabak, a 33-year-old engineer, pleaded guilty to manslaughter but has denied murdering Yeates, who was found dead on a roadside verge in Failand, Somerset, on Christmas Day 2010. Tabak, who lived next door to Yeates, is due to go on trial accused of murder at Bristol crown court in October.

Tabloid media coverage at the time of Jefferies's arrest was intense, with speculation about the suspect rife in newspapers and the internet. Dominic Grieve, the attorney general who brought the court action against the two papers, issued a rare warning to the press at the time about their reporting.

Two of the three articles found in contempt of court were published the day after Grieve's warning, on New Year's Day. The attorney general welcomed Friday's judgment, saying: "[The Daily Mirror and Sun] breached the Contempt of Court Act and the court has found that there was a risk of serious prejudice to any future trial."

Ken Clarke, the justice secretary, echoed the attorney general's warnings in March when he said that media focus on suspects in recent criminal cases had been "startling" and "far removed" from what it was just a few years ago.

Contempt of court proceedings are infrequently issued against newspapers. It is more unusual still for the attorney general to take action in defence of an individual who has not been charged.

Eight national newspapers separately issued a public apology to Jefferies over libellous claims made about him in the aftermath of his December arrest. The Sun, Daily Mirror, Sunday Mirror, Daily Record, Daily Mail, Daily Star, the Scotsman and Daily Express agreed to pay the retired public-school teacher damages.

Lawyers acting for Jefferies said he had been the victim of "regular witch hunts" in more than 40 articles in the tabloid papers. Bambos Tsiattalou, the solicitor who advised Jefferies after he was taken into police custody, said that the newspapers had ignored warnings to be careful about what they published.