The National Football League announced Wednesday that all players who are on the field when the national anthem is heard before a game must stand — or they can choose to remain in the locker room without penalty.

Teams will be subject to a fine if a player disobeys, NFL Commissioner Roger Goodell said at a news conference.

Goodell described the vote at the league's spring meeting in Atlanta as unanimous, but the San Francisco 49ers — whose quarterback Colin Kaepernick sparked the controversy by refusing to stand before a game in 2016 — said later that they had abstained. Jed York, the team's owner, said he planned to meet with his players "to make sure everything we do is about promoting the right types of social justice reform and getting to a better America."

The NFL had previously suggested that players should stand, but it stopped short of enforcing fines. The new policy says clubs can still develop their own work rules for players and personnel who don't stand, but they must be "consistent with the above principles."

That means teams could choose to pass along fines to players. But Christopher Johnson, chief executive of the New York Jets, said that the team would cover any fines because "I never want to put restrictions on the speech of our players."

"Instead, we will continue to work closely with our players to constructively advance social justice issues that are important to us," Johnson said in a statement.

Johnson is the brother of Jets owner Woody Johnson, who is President Donald Trump's ambassador to the United Kingdom. Trump has been a vocal critic of the player protests.

While the move is in response to dozens of players who knelt as a form of protest over social justice issues over the last two seasons, the guidelines aren't specific about what constitutes a sign of disrespect directed toward the anthem. The amount of the fine was also unclear.

"All 32 clubs want to make sure that during the moment of the anthem and the flag, that that is a very important moment for a lot of us as a league, as clubs and [for] our country, and it's a moment we want to make sure is done in a respectful fashion," Goodell said.

"It was unfortunate that on-field protests created a false perception among many that thousands of NFL players were unpatriotic. This is not and was never the case," the league also said in a statement announcing the new policy.

The union representing players lashed out at the league's decision, tweeting that it hadn't been consulted.

"The NFL chose not to consult the union in the development of this new 'policy,'" the NFL Players Association said in a statement. "NFL players have shown their patriotism through their social activism, their community service, in support of our military and law enforcement and yes, through their protests to raise awareness about the issues they care about."

Goodell said hundreds of players were asked for their input. Dallas Cowboys owner Jerry Jones, one of the most influential figures in the league, declined to answer when he was asked how much input the players had, saying only: "Certainly, we discussed that."

The controversy over players who kneel during "The Star-Spangled Banner" has raged since 2016, when Kaepernick, then a quarterback with the 49ers, first refused to stand as a lone protest against police brutality, particularly against black Americans, and racial oppression.

Eventually, some teammates joined him. Other players chose to raise their firsts in silent solidarity instead of kneeling.

"To me, this is bigger than football, and it would be selfish on my part to look the other way," Kaepernick told NFL Media in late summer 2016. "There are bodies in the street and people getting paid leave and getting away with murder."

Kaepernick, who is biracial and has been without a team since the 2016 season, filed a grievance against the NFL last year, claiming that owners colluded to keep him out of the league.

Trump has been outspoken in his criticism of the take-a-knee movement has been, saying in September that he felt "ashamed" by "disgraceful" NFL-wide protests and what he characterized as disrespect toward U.S. service members.

And Vice President Mike Pence on Wednesday afternoon tweeted a news report about the policy change with only the comment "#Winning."

But not everyone was in support.

Former New York Giants defensive tackle Dominique Hamilton tweeted that because the NFL remains majority black, the power is in the players' hands: "If united and didn't take the field at all, it would upset a lot of people and a lot of executives."

Sage Rosenfels, an NFL quarterback from 2001 to 2012, mocked the league's decision by tweeting that fans shouldn't be allowed to buy stadium concessions while the anthem plays. York, the 49ers' owner, said he was considering doing just that.

But Goodell said: "We think we've come up with a balanced process here in our procedure and policy. We'd like for all [players] to be on the field and stand at attention."