Lawmakers on Thursday rejected the judicial nomination of a close friend of Gov. John G. Rowland (search), who is under fire for accepting gifts from friends and state contractors.

Interim Judge Joseph Mengacci (search) survived a razor-thin confirmation vote Wednesday in the House of Representatives; the Senate shot down his bid for an eight-year term as judge by a 21-10 vote.

Mengacci, nominated by Rowland last October, must step down immediately. He has been a judge in New Haven Superior Court since November. Before that, he ran a law firm.

"The vote today is, in every sense, political," said Dean Pagani, Rowland's spokesman and chief of staff. "It was getting Mengacci and it was about sending a signal to Gov. Rowland."

Some lawmakers said Mengacci's nomination should be considered in the context of the controversy swirling around Rowland.

Mengacci has vacationed with Rowland, and his wife works in the governor's Capitol office. But Mengacci was unable during his confirmation hearing to provide details of the various gifts he and his family provided Rowland over the years.

Rowland faces state ethics and criminal investigations after admitting last year he accepted gifts from state contractors and employees. Federal authorities are also investigating him. The Republican governor has said he has done nothing in exchange for any gifts.

Earlier this week, Attorney General Richard Blumenthal said Mengacci violated the state's "revolving door" law by applying for a judgeship less than two years after leaving his post as head of the Judicial Selection Commission.

"It is important for us to be clear that the rules apply to everyone," Democratic Senate President Pro Tem Kevin Sullivan said.

Republican Sen. William Nickerson argued there wasn't enough reason to reject the nomination — and complained about some lawmakers' criticism that Mengacci was evasive or cocky during the confirmation hearing.

"The objection is he's not humble," Nickerson said. "This may come as a shock, and I don't mean to offend anyone, but I've met a lot of senators and representatives who are not humble."

Earlier Thursday, Rowland said he thought the Senate would "do the right thing" and confirm his friend.

"These are folks that have given up their law practices, given up their careers, have been pretty much told that, you know, everything is smooth sailing, and then they run into this political gamesmanship," Rowland said.

Last week, another Rowland judicial nominee, James Robertson, withdrew his name amid controversy that he provided the governor with hundreds of hours of free legal work.