So long, replacement refs. The NFL’s regular crews will be back on the field starting Thursday night.

After two days of marathon negotiations — and mounting frustration among coaches, players and fans — the NFL and the referees’ union announced at midnight ET Thursday that a tentative agreement had been reached to end a lockout that began in June.

GameTimeGirl

Commissioner Roger Goodell, who was at the bargaining table Tuesday and Wednesday, said the regular officials would work the Browns-Ravens game in Baltimore.

“Welcome back REFS,” Buffalo Bills running backC.J. Spiller tweeted shortly after the news broke.

The replacements worked the first three weeks of games, triggering a wave of outrage that threatened to disrupt the rest of the season. After a missed call cost the Green Bay Packers a win on a chaotic final play at Seattle on Monday night, the two sides really got serious.

“We are glad to be getting back on the field for this week’s games,” referees union president Scott Green said.

The tentative eight-year deal is the longest involving on-field officials in NFL history and was reached with the assistance of two federal mediators. It must be ratified by 51 percent of the union’s 121 members, who plan to vote Friday and Saturday in Dallas.

The agreement hinged on working out salary, pension and retirement benefits for the officials, who are part-time employees of the league. Tentatively, it calls for their salaries to increase from an average of $149,000 a year in 2011 to $173,000 in 2013, rising to $205,000 by 2019.

Under the proposal, the current defined benefit pension plan will remain in place for current officials through the 2016 season or until the official earns 20 years of service. The defined benefit plan will then be frozen.

Retirement benefits will be provided for new hires and for all officials beginning in 2017, through a defined contribution arrangement. The annual league contribution made on behalf of each game official will begin with an average of more than $18,000 per official and increase to more than $23,000 per official in 2019.

Beginning with the 2013 season, the NFL will have the option to hire a number of officials on a full-time basis to work year round, including on the field. The NFL also will be able to retain additional officials for training and development, and can assign those officials to work games. The number of additional officials will be determined by the league.

“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.”

The use of replacement refs isn’t new to the NFL. They worked the first week of games in 2001 before a deal was reached. But those officials came from the highest level of college football; the current replacements did not. Their ability to call fast-moving NFL games drew mounting criticism through Week 3, climaxing this past weekend, when ESPN analyst Jon Gruden called their work “tragic and comical.”

Those comments came during “Monday Night Football,” with the Seattle Seahawks beating the Green Bay Packers 14-12 on a desperation pass into the end zone on the final play. Packers safetyM.D. Jennings had both hands on the ball in the end zone, and when he fell to the ground in a scrum, both Jennings and Seahawks receiverGolden Tate had their arms on the ball.

The closest official to the play, at the back of the end zone, signaled for the clock to stop, while another official at the sideline ran in and then signaled touchdown.

The NFL said in a statement Tuesday that the touchdown pass should not have been overturned — but acknowledged Tate should have been called for offensive pass interference before the catch. The league also said there was no indisputable evidence to reverse the call made on the field.

That drew even louder howls of disbelief. Some coaches, including Miami’s Joe Philbin and Cincinnati’s Marvin Lewis, tried to restore some calm by instructing players not to speak publicly on the issue.

Fines against two coaches for incidents involving the replacements were handed out Wednesday.

New England Patriots coach Bill Belichick was docked $50,000 for trying to grab an official’s arm Sunday to ask for an explanation of a call after his team lost at Baltimore. And Washington Redskins offensive coordinator Kyle Shanahan was tagged for $25,000 for what the league called “abuse of officials” in the Redskins’ loss to Cincinnati on Sunday. Two other coaches, the Denver Broncos’ John Fox and assistant Jack Del Rio, were fined Monday for incidents involving the replacement officials the previous week.

“I accept the discipline and I apologize for the incident,” Belichick said.

Players were in no mood for apologies from anyone.

“I’ll probably get in trouble for this, but you have to have competent people,” Carolina Panthers receiverSteve Smith said. “And if you’re incompetent, get them out of there.”

Added St. Louis Rams quarterback Sam Bradford: “I just don’t think it’s fair to the fans; I don’t think it’s fair to us as players to go out there and have to deal with that week in and week out. I really hope that they’re as close as they say they are.”

They were.

-AP