The Democratic-controlled Senate on Thursday defeated a Republican amendment that would have placed guaranteeing the security of the southwest border with Mexico ahead of legalizing the status of the country's undocumented residents.

The Senate in a 54-43 vote approved a motion rejecting the amendment proposed by Republican Texas Sen. John Cornyn on a day marked by continuing divisions surrounding the route to - and content of - comprehensive immigration reform.

The amendment is similar to one defeated by the Senate Judiciary Committee last month.

The Senate, meanwhile, is scheduled to officially announce in the coming hours an agreement to strengthen border security that would include hiring 20,000 Border Patrol agents and building a wall all along the 1,126 kilometers (about 700 miles) of border with Mexico, among other things.

Senate Majority Leader Harry Reid of Nevada said that the accord on border security is being prepared and incorporated via an amendment to the immigration reform bill.

The Senate began formal debate on immigration reform on June 11 and since then lawmakers have presented 246 amendments to the reform plan. Of those, 11 have been submitted for debate and a vote.

The House of Representatives still must present its own version of immigration reform and, according to what the head of the Hispanic caucus for that chamber told Efe, it will be presented in the coming days. EFE