Following a Monday Night Football debacle that was seen nationwide, the National Football League and the referees' union announced on Wednesday night that the two sides reached a tentative agreement, ending the referee lockout.

The sides had been negotiating for two straight days and reached an agreement in time to bring the regular officials back to the field for this week's games. Commissioner Roger Goodell announced that the officials also would be able to work Thursday's Baltimore Ravens-Cleveland Brown's game.

"We are glad to be getting back on the field for this week's games," referees union president Scott Green said to the Associated Press.

The tentative agreement is for eight years and is the longest agreement between the officials and the league in NFL history. Two federal mediators helped push the deal along and the 121 referees will meet in Dallas to vote and ratify the agreement on Friday.

The financial issues and pension plans were the main sticking point of the lockout. The sides came to an agreement on salary increases for the officials, from an average of $149,000 a year in 2011 to $173,000 in 2013, rising to $205,000 by 2019.

The new proposal keeps the current pension plan in place for current officials and will remain through the 2016 season. Starting in 2017 retirement benefits will be provided for all officials, including new hires, and the league will make contributions with an average of more than $18,000 per official and increase to more than $23,000 per official in 2019.

Other parts of the agreement include an option for the NFL to hire a full-time crew of officials in 2013. The group will be able to work on a full-time basis and will train and develop with the league to learn how to work NFL games.

"As you know, this has to be ratified and we know very little about it, but we're excited to be back. And ready," referee Ed Hochuli told The Associated Press in a telephone interview. "And I think that's the most important message -- that we're ready."

This year wasn't the first time replacement referees have been used, the NFL had them for the first week in 2001, but back then there was no Twitter. This year, after the controversial Monday Night Football game, the Internet exploded, forcing the NFL and the union to come together and finally get things straightened out.

The agreement marks the end to a strange and controversial first three weeks of the NFL season. The referees blew a call for the Packers in their 14-12 loss to the Seahawks on Monday night, coaches have been fined for yelling at officials and the referees have been seen as inept and unable to control players during actual games.

New England Patriots coach Bill Belichick was docked $50,000 for trying to grab an official's arm, Washington's Kyle Shanahan was fined for berating officials during and after a game and Broncos coach John Fox was fined for yelling at officials during last week's Monday night game.

Either way, the players, fans and the league will be happy to see a better product on the field now that the regular officials are back.

Buffalo Bills running back C.J. Spiller said it best after the news broke: "Welcome back REFS," he tweeted.