Both chambers of the General Assembly passed bills Tuesday that ban state agencies from mentioning labor agreements when negotiating contracts on projects.

The House passed the bill 69-29 after a spirited debate Monday. In the Senate, Republicans and Democrats split, 20-20, forcing Lt. Gov. Bill Bolling (R), who presides over the chamber, to cast the tie-breaking vote for the bill.

The bill did not mention but was thought to be aimed at Metrorail’s extension to Dulles International Airport. The project was referenced several times during debate on the measure.

“Public dollars should not be diverted to projects involving Project Labor Agreements that favor union shops over merit shops,’’ Bolling said in a statement. “This critical legislation protects our right-to-work law and continues to promote a pro-business environment.”

Sen. Mark Obenshain (R-Harrisonburg), who introduced the bill, said it would level the playing field, increase competition and keep costs down.

“Bidding should be open to union and non-union contractors alike,’’ said. “We shouldn’t be playing favorites when taxpayer dollars are on the line. SB 242 is about getting the most value for taxpayer dollars, and it put an end to union-only PLA language that leaves Virginia contractors out in the cold.’’

But Democrats fought vigorously against bill.

“This bill serves no useful purpose,’’ Sen. Dick Saslaw (Fairfax), the Democratic leader in the chamber. “I don’t see where this bill is needed.”

Gov. Bob McDonnell (R) supports the bill and expects to sign it into law, his staff says.