The mayor of District Heights was arrested early yesterday in the District after allegedly offering an undercover male police officer $40 for sex in a known prostitution area, authorities said.

James L. Walls Jr., 30, was arrested at 12:30 a.m. at Sixth and F streets NW, near Verizon Center. He was charged with solicitation for lewd and immoral purposes, police said. He was issued a citation and released.

Walls, who is single, was known as a rising star among young Democrats in Prince George's County. He was the youngest person elected mayor of District Heights -- a community inside the Beltway with a population of about 6,000. He was elected mayor in May 2006; his term runs until 2010.

He also serves as an associate minister at the Forestville New Redeemer Baptist Church and works for Fairmount Heights as town administrator, according to the District Heights Web site.

Officers regularly conduct sting operations in the area where Walls was arrested, D.C. police said. Sometimes they make as many as 14 arrests a night, said Inspector Brian Bray, head of the narcotics and special investigations unit.

In District Heights, Walls called an emergency meeting yesterday afternoon with city officials to discuss the matter, Vice Mayor Eddie L. Martin said. "This is an unfortunate situation," Martin said.

Walls did not return a phone message seeking comment last night. Martin said that Walls told him he would have no public comment.

Martin declined to reveal what was discussed at the meeting but said the commission offered its support. Martin said he looks forward to the mayor getting "his day in court."

The Rev. Nathaniel Thomas, pastor of Forestville New Redeemer Baptist Church, said he was stunned by the news. "I'm very, very shocked," Thomas said. "But we are praying for him.

"I hope he will put a call to me so we can pray together. . . . I'm not passing judgment. We are innocent until proven guilty," Thomas said.

Thomas said Walls, a graduate of Bowie State University, has attended the church for less than six months.

"He's been a delight," the pastor said, referring to the community work Walls has done with senior citizens. "I know this is going to be a shocker to the congregation."

Del. Carolyn J.B. Howard (D-Prince George's) also expressed surprise, adding that Walls "appeared to be a wonderful young man with a bright future."

According to the District Heights Web site, Walls is president of the Maryland Black Mayors Association and was appointed chairman of the National Conference of Black Mayors-Small Town and Rural Development Committee.

He was elected last year as vice president of tourism for the World Conference of Mayors, the Web site says. In 2006, he was selected as one of the most progressive leaders in the country younger than 40 by the People for the American Way Foundation.