State Sen. Louise Lucas D-Portsmouth, speaks to other senators during the start of the 2012 session of the Virginia Senate. (Steve Helber/AP)

Republicans briefly broke an impasse in a long-running Virginia Supreme Court battle on Tuesday when a Democratic lawmaker split with her party — but the victory was short-lived.

The deal collapsed within an hour or so when Sen. L. Louise Lucas came back to the Democratic fold.

Lucas (Portsmouth) voted in a Senate committee Tuesday afternoon to support the appointment of state Court of Appeals Judge Rossie D. Alston Jr. to the high court.

His appointment would dash any hopes that Gov. Terry McAuliffe (D) could salvage his own pick for the judicial post, highly regarded former Fairfax County Circuit Court judge Jane Marum Roush.

McAuliffe gave Roush a recess appointment in the summer, angering Republican House and Senate leaders because he did not consult them before making the choice. He then granted her a second recess appointment, which Republicans have said was illegal because the House had not gaveled out of session.

That appointment will expire at the end of the week regardless of whether the legislature installs someone else.

The Republican-dominated House has stood ready to elect another judge since Virginia’s legislative session began in January. But the GOP has struggled to muster the necessary votes in the Senate, which it controls by a narrow 21-to-19 margin. Freshman Sen. Glen Sturtevant (R-Richmond) has said he will not go along with plans to replace Roush.

Senate Republicans thought they had an opening recently, when Sen. Kenneth C. Alexander (D-Norfolk) said he was considering voting for Alston. But he later said he had decided to support Roush.

News that Lucas would support the appointment of Alston shocked fellow Democrats. Lucas offered her backing as part of a deal that would elevate Portsmouth Circuit Court Judge Kenneth R. Melvin, a former Democratic delegate, to Alston’s current judicial slot, senators said.

But by evening, after talking with Melvin and McAuliffe, Lucas had reconsidered.

“I have spoken with Judge Melvin and he said he is ‘perfectly satisfied’ as a Circuit Court judge in the city of Portsmouth,” Lucas said in a statement.

Some Democrats said they had been caught flat-footed by Lucas’s move, which took place at an impromptu Senate Courts of Justice meeting called on the Senate floor at the end of the day’s session, at the desk of the committee’s chairman.

Tom Jackman contributed to this report.