The state's highest court on Wednesday rejected an attempt by the city's mayor to prevent documents from being made public that detail a city settlement that helped conceal an apparent affair with a top aide.

The Michigan Supreme Court unanimously upheld two lower court rulings ordering the release of documents. They were made public hours after the ruling.

The papers pertain to an $8.4 million settlement between the city and two former police officers who alleged they were fired or forced to resign for investigating claims that Mayor Kwame Kilpatrick used his security unit to cover up extramarital affairs.

They include the initial settlement agreement between the city and the former officers, which makes reference to embarrassing and sexually explicit text messages between Kilpatrick and former Chief of Staff Christine Beatty. The unsealed documents do not include transcripts of the actual messages.

They also include a transcript of a Jan. 30 deposition of attorney Michael Stefani, who represented the two former officers in their lawsuit, by lawyers for two newspapers that sued to get the sealed documents, The Detroit Free Press and The Detroit News. In the deposition, Stefani said he thought Kilpatrick rejected an Oct. 17 settlement agreement because the Free Press had filed a Freedom of Information Act request for the settlement.

"I'm presuming, but don't know for a fact, that they — that is, Mayor Kilpatrick and perhaps Beatty, did not ... want the reference to the text messages in the settlement agreement," Stefani said.

After the mayor rejected that agreement, a separate confidentiality agreement detailing how the text messages would be kept secret was reached Nov. 1 between all parties.

City Corporation Counsel John Johnson said the city is disappointed by the ruling.

"Opening up settlement information to public view will most certainly put a chilling effect on parties trying to settle cases," Johnson said in a statement. "This ruling discourages the city from entering into the time honored and cost effective process of mediation."

The Detroit Free Press and The Detroit News sued the city to get the sealed documents. The city argued the documents should remain sealed because they involved communications between attorneys during court-ordered mediation, but the high court ruled "there is no FOIA exemption for settlement agreements," referring to the state's Freedom of Information Act.

The Free Press first reported last month about the text messages between the married mayor and Beatty, who also was married at the time. The newspaper has not said how it obtained the messages.

Both denied under oath having a physical relationship during the former officers' lawsuit, and the unsealed documents could be used in an ongoing perjury investigation of Kilpatrick. Wayne County Prosecutor Kym Worthy is investigating and has said she expects to have a decision by mid-March.

"This is complete vindication for the idea that public officials cannot lie under oath and go behind closed doors in secrecy to make decisions with so much public money in the balance," Free Press Editor Paul Anger said in a story posted on the paper's Web site. "The public's right to know has been upheld."

James E. Stewart, attorney for the News, said the public will soon "have access to their own records. These are public records involving the expenditure of millions of dollars of public money that the mayor has attempted to keep from the public and the City Council."