The planned fence along the U.S.-Mexican border will no longer cut off a large chunk of a South Texas university, according to an agreement that the school and the federal government presented to a judge Thursday.

U.S. District Judge Andrew Hanen, who had ordered the University of Texas at Brownsville and the U.S. Department of Homeland Security to work on a compromise, accepted the deal in principle and ordered both sides to submit it in writing by Tuesday.

Under the agreement, the government will not condemn any university land and will not build a fence on campus. In exchange, the school will enhance an existing fence that is in disrepair so that it will stand 10 feet tall next to the levee that runs north of the campus golf course. The university will also invest in additional cameras and allow the Border Patrol to install its cameras and sensors on the fence.

It is a far cry from the 15- to 18-foot steel fence originally proposed that could have disrupted the university's access to its golf course, threatened plans for expansion and harmed the school's binational reputation and mission. The University of Texas System agreed to pay for improving the university's fence.

"There will be absolutely no additional impediment to the golf course," a jubilant university President Juliet Garcia said, adding that the improved fence "can be a very friendly fence."

"I see it with bougainvillea and vine growing all over it," she said.

Garcia commended DHS and Border Patrol for working toward a compromise and said that making the university a test case to study alternatives to physical barriers is what the school wanted all along. The Border Patrol will also support the university's efforts to win approval from the International Boundary and Water Commission to move the levee to allow expansion toward the Rio Grande.

The university on June 30 accused the government of violating an earlier court-approved agreement to study alternatives, and Hanen ordered both sides to find a solution that would meet the Border Patrol's security needs without disrupting the school.

Assistant U.S. Attorney Daniel Hu told Hanen that if the terms of the agreement are followed, the government would drop its right-of-entry case against the university.

Hanen thanked both sides for working out a compromise that "allows both parties to fulfill their mission."

The Department of Homeland Security is racing to finish 670 miles of barriers along the border by the end of the year to comply with a congressional mandate.

The university and its two-year sister school Texas Southmost College have been the most formidable opponents of a border fence that is widely unpopular in the Rio Grande Valley. The university with a 17,000-student enrollment and part of the nation's second-largest university system argues that the fence would crush expansion plans and offend the university's mission to offer a binational education.

Earlier this month, Garcia visited Washington, D.C., for meetings with Customs and Border Protection Commissioner W. Ralph Basham and Border Patrol Chief David Aguilar.

Hanen is also scheduled to hear 13 land condemnation cases Thursday as the government readies the fence's path in Cameron County.

One of those landowners is Eloisa Tamez, who has fought the government every step of the way. Tamez has appealed an earlier temporary condemnation that allowed the government to survey her land for the border fence and countersued. On Thursday, Hanen will consider a final request from the government to condemn about a quarter acre of land that has been in her family for generations.

Contractors began work on two segments of a combined levee-border wall in neighboring Hidalgo County last weekend. They are the first new sections of fence to get under way in Texas.