DETROIT (AP) – Mayor Kwame Kilpatrick pleaded for forgiveness from his wife and constituents Wednesday in an emotional but carefully worded televised speech, avoiding direct mention of racy text messages that appear to contradict his sworn denials of an affair with a top aide.

"I truly apologize to you," Kilpatrick said, turning to his wife, Carlita, who sat by his side, holding his hand, at their family church.

"I am the mayor. I made the mistake," Kilpatrick told Detroit residents, looking into the camera. "I am accountable."

He did not publicly specify what he was apologizing for, saying legal matters prevented him from doing so.

A prosecutor is investigating whether the mayor and chief of staff Christine Beatty lied under oath during a whistle-blower's lawsuit last summer in which both denied having a physical relationship. A conviction of lying under oath can bring up to 15 years' imprisonment.

Kilpatrick vowed to remain mayor in the carefully orchestrated speech, which aired live in prime time on local television and radio stations. His voice cracked at least once during his apology, and he and his wife held hands at times while detailing how the events had affected their family.

"I want to make a public apology to my entire family, and specifically to the four people who I love the most in the world," he said during the speech at Greater Emmanuel Institutional Church of God in Christ. "First, I want to apologize to my sons, Jalil, Jelani and Jonas. For the first time in my life, I had to have a conversation with my 12-year-old twin sons about very grown-up things. It was without a doubt the hardest conversation that I've ever had in my entire life."

There was no audience and no reporters or photographers, save for the operator of the sole video camera used. Kilpatrick made no mention of the text messages or Beatty.

"Make no mistake about it; since 2002, I have been in charge of the city. There have been ups and downs. There have been hills and mountains and valleys. But through it all, I remain in charge of the city," he said.

The speech ended a week of seclusion for Kilpatrick since the Detroit Free Press reported on the text messages. His only public response had been a written statement a week ago.

Carlita Kilpatrick also spoke Wednesday, describing the pain her husband had caused, but urging the city to remain committed to him.

"I am angry, hurt and disappointed," she said. "But no question I love my husband."

Kwame Kilpatrick, 37, is in his second term and could run again next year, but the revelation of the text messages from 2002 and 2003 could end his political career.

The messages call into question testimony Kilpatrick and Beatty gave in a lawsuit filed by two police officers who alleged they were fired for investigating claims that the mayor used his security unit to cover up extramarital affairs.

In court, Kilpatrick and Beatty denied having a physical relationship, but the text messages reveal that they carried on a flirty, sometimes sexually explicit dialogue about where to meet and how to conceal their trysts.

Kilpatrick wrote Beatty in 2002: "I've been dreaming all day about having you all to myself for 3 days. Relaxing, laughing, talking, sleeping and making love."

Beatty submitted a letter of resignation Monday, effective Feb. 8.

At a pro-Kilpatrick rally outside the mayor's office a few hours before his speech, supporters held signs reading "Leave Kwame Alone," ”Protect the mayor - protect your city" and "Mayor Kilpatrick Progress."

"He is our mayor. We choose to judge this man by his entire character," said the Rev. Horace Sheffield III, pastor of New Galilee Missionary Baptist Church. "What the mayor has done is unexplainable but not unforgivable."

After another crowd gathered a short time later to call for the mayor's resignation, shouts of "resign" were drowned out by retorts of "We love Kwame."

"I feel he should go to jail for lying on the stand. He's embarrassing for everyone," said Joann Jackson, 63, who carried a white T-shirt bearing a depiction of Kilpatrick's face and the words: "JUST QUIT."

Controversy has surrounded Kilpatrick since his 2001 election as mayor.

Embraced by many Detroit residents for his boldness and confidence, Kilpatrick, then 31, embodied the new black politician and wore a diamond stud earring that helped foster his unofficial title as "Hip-Hop Mayor."

His first four years were marred by use of his city-issued credit card for expensive travel, the city's lease of a luxury Lincoln Navigator for his wife and unsubstantiated allegations of a wild party involving his security team and strippers at the mayor's mansion.

At the start of his second term, Kilpatrick vowed to not make the same mistakes and announced a residential redevelopment along Detroit's dormant riverfront, a successful Super Bowl that shone a light on the city's renewal efforts and other improvements.