Seeking to end a political controversy that has embarrassed professional football, the N.F.L.’s team owners on Wednesday held that players could no longer kneel during the national anthem without leaving themselves open to punishment or their teams facing possible financial penalties.

But the league also said the new policy would not force athletes to stand on the sideline during the anthem; it would give them the option of staying in the locker room during the pregame ceremony. Almost immediately after passage, questions arose about how it would be enforced.

The policy is an attempt to find a middle ground on a divisive issue that has shaken the country’s most successful sport for nearly two years, beginning when the former San Francisco 49ers quarterback Colin Kaepernick knelt during the national anthem to protest police violence against minorities and economic inequality. President Trump escalated the issue a year later as he attacked kneeling players as unpatriotic, a stand that is believed to have contributed to a decline in television ratings.

[Ken Belson writes “the N.F.L.’s new anthem policy is bound to please only the N.F.L.”]

Roger Goodell, the commissioner of the N.F.L., said the protests, which began in the summer of 2016, created a “false perception among many that thousands of N.F.L. players were unpatriotic.” He added, “The new policy will keep our focus on the game and the extraordinary athletes who play it — and on our fans who enjoy it.”