BOSTON (AP) — Two of the Republican candidates in Massachusetts' special U.S. Senate election have launched competing attack ads less than three weeks before voters head to the polls to decide the primary contests.

Michael Sullivan released the first ad taking direct aim at Gabriel Gomez, one of his two GOP rivals.

The 30-second ad, titled "Obama Republican," focuses on a letter Gomez sent in January to Democratic Gov. Deval Patrick, asking Patrick to appoint him interim U.S. Senator to fill on a temporary basis the seat left vacant by the departure of John Kerry to become secretary of state.

Gomez criticized Sullivan for being the first candidate to launch a negative ad, labeling it "mudslinging" and an act of desperation by a losing candidate.

Hours later, Gomez launched his own 30-second ad calling all the other Republican and Democratic candidates in the race "career politicians." The ad also labeled Sullivan "a guy who's been in politics two decades."

The ads mark an escalation in the campaign rhetoric among the Republican candidates. Television ads produced by the two Democratic candidates — U.S. Reps. Edward Markey and Stephen Lynch — have so far avoided criticizing each other directly.

In Sullivan's ad, a narrator asks: "The Washington Republican establishment, will they back a candidate who supports Barack Obama?"

"It's true," the narrator continues. "Gabriel Gomez wrote to Deval Patrick saying he supported President Obama and Gomez wrote that he supports the positions that President Obama has taken and will keep his word."

The ad calls Sullivan "the true independent Republican."

In his letter to Patrick seeking the temporary Senate post, Gomez wrote that the "two main issues that will dominate the political discussion during this appointment will be immigration reform and gun control."

"I support the positions that President Obama has taken on these issues, and you can be assured that I will keep my word and work on these issues as I have promised," he added.

Gomez has since sought to distance himself from Obama on the issues, including Obama's push for an assault weapons ban. Gomez said the letter could have been worded better and that he was simply offering to serve his country.

The former Navy SEAL also faulted Sullivan's decision to launch the ad.

"Why is he attacking me? Because he is losing. That's what career politicians do when they are losing," Gomez said in a statement. "When will Mr. Sullivan learn that mudslinging and petty politics isn't going to solve our spending problem in Washington?"

In a press release, Sullivan defended the ad.

"I think it's fair for the voters to compare what Gomez is saying today versus what he privately wrote to Deval Patrick in January, when he practically begged for the job," Sullivan said.

Despite his criticism of the harsh tone of Sullivan's ad, Gomez adopted a similar tone in his ad.

"Why is Congress gridlocked? Because we keep sending career politicians to Washington," a narrator says. "Your choices now? Congressman Markey, Congressman Lynch, legislator Winslow and Mike Sullivan, a guy who's been in politics two decades."

The ad also lists Gomez' credentials as a businessman and former Navy SEAL and his proposals for Congressional term limits, a ban on lawmakers becoming lobbyists and a ban on members of Congress receiving their salary if they don't pass a budget.

The launch of the two ads comes a day after a contentious televised debate that divided the three Republican candidates on everything from gun control to immigration and when and how to withdraw U.S. troops from Afghanistan.

The primary is April 30. The election is June 25.