File photo of D.C. Council members David Catania, center, and Marion Barry, right. Council member Mary Cheh is at left. (Bill O'Leary/The Washington Post)

When the D.C. Council held its annual retreat at the convention center last year, David A. Catania and Marion Barry nearly came to blows after years of rivalry and animosity erupted in public.

During a profanity-laced exchange, Catania called Barry “a despicable human being,” and the 77-year-old former mayor said he almost punched his 45-year-old colleague. The altercation, similar to other spats between the two, forced the council to implement rules barring members from cursing in a public meeting.

On Friday, the 13-member council will be back in the Walter E. Washington Convention Center for this year’s retreat. This time, however, Catania (I-At Large) and Barry (D-Ward 8) are buddies.

“There is a mutual respect between the two of us,” Catania said in an interview.

“We have now come together more dramatically than ever before,” Barry added in a separate interview.

They have become the District’s latest political odd couple. The dramatic change in the relationship began in January, after Catania became the chairman of the Education Committee.

Catania, who is white, reached out to Barry, who remains one of the city’s most visible black leaders. It was an effort to avoid the pitfalls surrounding race and public education in the District, Catania said.

Catania is vowing to strengthen teacher accountability, raise students’ expectations, and increase cooperation between traditional public and charter schools — and thinks Barry can help him avoid the pitfalls that tripped up former mayor Adrian M. Fenty (D) and former schools chancellor Michelle A. Rhee.

“What we are trying to do with public education is going to require us doing our best to communicate with all citizens,” Catania said, noting that some of the system’s most troubled schools are in Barry’s ward. “And there is no question Marion is one of the best communicators in government.”

Barry has embraced his new role, relishing it as an opportunity to exert influence on an issue that has long bedeviled city officials.

“David knows that, as a white person, regardless of who they are, they would have a hard time getting things through a 90 percent African American school system, and I can help with that,” said Barry, a member of the Education Committee. “People have faith in me not to sell them out. Sometimes I can be the bad cop and he can be the good cop, and sometimes I can be the good cop and he can be the bad.”

Although theirs is partially a marriage of political convenience, both men note that their relationship has evolved over 15 years.

In recent months, Catania and Barry have co-sponsored a bill and exchanged text messages and birthday greetings. And Catania said he looks after the diabetic Barry, including making sure he doesn’t eat too much sugar.

“Sometimes, families have complicated relationships, and Marion and I have been in each other’s lives so long, sometimes I feel like that,” Catania said. “We are obviously two big personalities, and personalities can clash, and they do clash. But it’s important for people to know that is not how we are with each other every day.”

When Catania was elected in 1997 as a 29-year-old gay Republican, then-Mayor Barry worried that African Americans’ grip on city government was loosening. Barry vowed to defeat him, arguing that the city didn’t need “Republican David Catania.”

After Barry left the mayor’s office, the nature of the relationship began to transition from disdain to rivalry. Respectful of their political talents, Catania and Barry have needled each other to boost their standings with bases.

“I have never been afraid of him, nor have I been shy about standing up to him,” said Catania, who became an independent in 2004. The same year, Catania invited Barry’s ex-wife, Effi, to see a renovated John A. Wilson Building. Over tea, the two formed what Catania called “a great friendship” that extended to Barry’s son, Christopher. When Effi died in 2007, Catania spoke at her funeral.

But the friendship collapsed in 2009, when Barry opposed Catania’s bill to legalize same-sex marriage. Catania said he was “hurt” when Barry spoke against the bill, citing moral beliefs that Catania doubted Barry held. They stopped speaking, and the public spats ensued. Barry, in turn, said he repeatedly felt belittled and “disrespected” by Catania, who at the time was head of the Health Committee on which Barry sat.

In December, Barry lobbied D.C. Council Chairman Phil Mendelson (D) against appointing Catania as head of the Education Committee. Mendelson did, and Catania reached out to Barry.

Catania, who is considering a bid for mayor next year, said he realized he needed a new approach to “speak to the broadest possible audience.” He turned to Barry, who said he warned Catania against becoming too aggressive when dealing with school officials. Barry cautioned that some parents may misinterpret contentious exchanges “as disrespecting black women, including Schools Chancellor Kaya Henderson.”

Assured Catania would heed the advice, Barry agreed in January to co-sponsor his bill to overhaul school truancy policies. Barry put his name on the bill, even though he opposes some of its provisions. “David is a lawyer and thinks a certain way, and I am a social scientist, engineer, and think another,” Barry said. “But everyone is going to benefit from our relationship.”

Last month, Barry texted Catania a day after they had spoken by phone. “Good morning,” Barry wrote. “I am delighted that U and I are working things out for the children’s sake.”

Catania, who shared the message with The Washington Post, responded: “Me too, Marion.”

Three weeks ago, around Barry’s birthday, Catania held a dinner at the Hay-Adams with members of the D.C. State Board of Education and D.C. Public Charter School Board. At the end, he arranged for the hotel to make a series of mini desserts for Barry’s celebration, sending along instructions to go light on the sugar.

“I’m on him all the time about his sugar consumption,” Catania said, referring to Barry’s diabetes.

Council member Jack Evans (D-Ward 2) said he and his colleagues remain a bit baffled by the new relationship. “They make these funny comments that they are best friends now,” Evans said. “But I can’t help but think there will be a parting of the ways again sometime down the road.”