The NFL and locked-out players moved to the brink of an agreement in principle to end the sport’s four-month shutdown when they completed a tentative deal Thursday on a new rookie pay system, according to several people not involved in the negotiations but familiar with them.

A few minor details on the rookie compensation system remained to be worked out as of early Thursday night but an accord on the issue was essentially in place, said those people familiar with the talks, who spoke on the condition of anonymity because of the sensitivity of the deliberations.

The virtual deal on the rookie pay issue removed the largest remaining obstacle to an agreement between the league and players to end the lockout, people within the sport said. People familiar with the negotiations said that, with the resolution on rookie pay, a handshake deal between the two sides was possible by Friday but still was more likely to take a few days longer than that to finish.

Several people familiar with the talks warned that a few issues were left to be resolved and some snags in the negotiations still could arise. But it appeared there was a growing expectation within the sport that a resolution to the long-running dispute was near.

It appears that the salary cap for the upcoming season will be set at approximately $141 million per team including salaries and benefits for players, of which about $120 million will be devoted to players’ salaries.

Thursday’s negotiating meeting in New York between the league and players ended around 10 p.m. Negotiations are scheduled to continue Friday.

Representatives of the league and players are scheduled to meet Tuesday in Minneapolis with their court-appointed mediator, Chief Magistrate Judge Arthur J. Boylan. They apparently would like to have an agreement in principle by then to present to Boylan.

The owners are scheduled to meet next Thursday in Atlanta and could take a ratification vote that day if an agreement is completed. A deal with the players would have to be approved by at least 24 of the 32 owners. If the negotiations unravel and there’s no deal for the owners to consider at their meeting in Atlanta, they could weigh canceling preseason games. The preseason is scheduled to begin Aug. 7.

Players would have to take a separate approval vote of any deal with the owners. They have been locked out by the owners since March 12.

The remaining unresolved issues apparently include retiree benefits and free agency rules. The league has been seeking provisions for this year’s free agency to give teams the right of first refusal for a few additional players, which would enable clubs to retain those players by matching any contract offers from other teams. The players’ side has been resisting that.

The remaining issues also could include the resolution of litigation between the two sides and a system for settling disputes that would not be subject to appeals to a federal court.

Thursday’s meeting was the second straight day between each side’s full negotiating teams, which include groups of owners and players. NFL Commissioner Roger Goodell and DeMaurice Smith, the executive director of the NFL Players Association, also participated. The owners’ group Thursday included eight of the 10 members of their bargaining committee.

The league has been seeking to curb the amount of guaranteed money in the contracts of players selected in the opening round of the NFL draft. The players’ side was willing to divert some money from rookies to veterans but was not willing to agree to a system as restrictive as what the league was seeking. The lengths of rookies’ contracts also was an issue.

Talks stalled late last week over the rookie pay issue, and the league and players appeared to make little progress on the matter Wednesday before Thursday’s breakthrough.

The rookie pay system is considered closely related to the core economic issue of the dispute: how the owners and players will divide the sport’s burgeoning revenues. It appears the players would receive just less than half the sport’s revenues under a salary cap system, under the terms of the prospective deal.