NPR and the SAG-AFTRA labor union have finally landed a tentative contract deal.

The news came in the early hours of Sunday morning after days of marathon talks.

NPR employs over 800 people, and the union says 433 of them are SAG-AFTRA members. Their last contract expired on June 30, and it was extended until midnight Friday and stretched again until midnight Saturday. An agreement was reached at 12:08 a.m. ET Sunday, the union said.

The tentative agreement, which would cover the next three years, still needs to go to NPR's unionized employees for approval.

Last week, employees announced that they were prepared to strike if a deal wasn't reached.

Related: PBS and NPR are ready to fight budget cuts -- again

SAG-AFTRA said in a statement Sunday that the new contract "provides for salary increases" and "effectively repelled" a proposed two-tier salary system that would have paid new hires less than veteran staffers.

NPR praised the new deal in a statement Sunday, calling the new terms "forward-looking."

Earlier, NPR had said wanted a deal that would "make this organization economically sustainable for the long-term."

NPR is a nonprofit with more than 980 member stations across various cities.