A neck and neck race ended with Luis Saenz winning the Democratic Party nomination for Cameron County District Attorney.
At one point on Tuesday night, Saenz and challenger were only separated by two votes.
But in the end, Saenz ended up leading with 8,063 votes or about 51 percent of the ballot.
Masso received 7,712 votes or about 49 percent of all ballots cast.
Saenz had previously served as district attorney between 1990 and 1996 before being voted out of office.
But Saenz will now go on to face Republican challenger Charles "Chuck" Mattingly in the November 2012 general election.
Observers say the winner will have a challenge restoring confidence in the Cameron County District Attorney's Office.
Current District Attorney Armando Villalobos is facing federal racketeering and extortion charges.
The trial for Villalobos is scheduled for April 2013.