Updated

Gov. Mitt Romney, who is weighing a White House bid, signed an agreement Wednesday that allows Massachusetts State Police troopers to detain illegal aliens they encounter over the course of their normal duties.

Under the terms of the agreement, made with the U.S. Immigration and Customs Enforcement agency, an initial group of 30 troopers will receive five weeks of specialized training next year, paid by the federal government.

The troopers will be drawn from the Violent Fugitive Apprehension Squad, the Criminal Investigation Section, the Anti-Gang Unit, the Drug Enforcement Unit and the Community Action Team.

"The scope of our nations illegal immigration problem requires us to pursue and implement new solutions wherever possible," Romney said in a statement. "State troopers are highly trained professionals who are prepared to assist the federal government in apprehending immigration violators without disrupting their normal law enforcement routines."

The governor, who has been burnishing his conservative credentials in anticipation of a campaign for the 2008 Republican presidential nomination, has advocated building a wall along the U.S.-Mexico border to staunch the flow of illegals into the country.

Yet the duration of the new policy is in doubt, because Romney leaves office Jan. 4 and his successor, Democrat Deval Patrick, has said he opposes placing the additional burden on the troopers.

"I'm going to investigate what power I have," the governor-elect told reporters last week. "You know that I think it's a bad idea for state troopers to be involved in immigration enforcement. They have enough to do as it is, and I said that consistently."

The agreement also comes at an embarrassing time for Romney, who has pledged to announce his decision about a presidential candidacy early next year. The Boston Globe reported recently that the landscaper who maintains the governor's 2.5-acre property in Belmont has been employing illegal aliens.