Indoor sports activists achieved a swift and sweeping victory Thursday in a legal settlement with the state of California that, when made official, will remove the state’s additional restrictions on sports such as basketball, volleyball and wrestling.

The settlement, which will allow all youth and high school sports to operate under the same reopening threshold while using similar testing protocols to those in college and the pros, came in response to a lawsuit filed last month in San Diego County by a pair of high school football players. Their attorney, Stephen C. Grebing, managing partner of Wingert Grebing of San Diego, said the settlement will allow all sports to compete in counties with adjusted case rates below 14 per 100,000 once it is finalized, possibly as early as Friday.

“Indoors, (the requirements are) going to be pretty rigid,” Grebing said. “But they’re going to be allowed to play.”

Gov. Gavin Newsom declined to comment on the settlement when asked Thursday, but Dr. Mark Ghaly, the Secretary for Health and Human Services, said updated sports guidelines would be released in the coming days. Attorneys for return-to-play advocates said the settlement was still being finalized Thursday afternoon but that they had “been assured” Newsom had “signed off” on the new guidelines.

Student-athletes in all but a handful of California’s 58 counties will be allowed under state rules to play indoor sports. However, local counties and school districts will still have the option to opt-out of the agreement, Grebing said.

All indoor sports athletes will be subject to the same weekly testing requirement as high-contact outdoor sports in counties with case rates between 7 and 14 per 100,000 but will only be able to escape the requirement once a county reaches a sport’s original tier assignment. For example, basketball players must be tested weekly until their home county’s adjusted case rate falls below 1 per 100,000, the threshold for the yellow tier.

California has only committed to providing free testing for athletes and coaches in high-contact outdoor sports, as it outlined in new guidance this week. For newly approved indoor sports, athletes and coaches will have to schedule tests through their insurance providers or a private company that Grebing said agreed to provide free testing for all indoor sports participants statewide.

Let Them Play CA founder Brad Hensley said the organization had partnered with the 11:11 COVID Project, a company Hensley said does testing for WalMart and Disney employees, to provide free PCR tests to athletes across the state.

Masks will be required for all coaches and staff, as well as players while on the bench — but not during competition, Grebing said.

Up to four spectators per player could be permitted, though the details were still being finalized, Grebing said.

Two days of negotiations followed the state’s first offer to settle Monday evening, Grebing said.

He informed a group of Bay Area basketball coaches of the development just hours after receiving the initial settlement offer Monday evening.

Frank Knight, the boys’ basketball coach at Moreau Catholic in Hayward, was on that Monday night call. He is teaching classes this week while on a trip to Hawaii and said he knew something was happening when his phone started buzzing early Thursday morning.

“I got up to teach my 8 o’clock class at 6,” Knight said. “While I am teaching it, my phone is blowing up. Everybody is calling. I’m like, ‘They must have made it OK to play basketball.’”

Two weeks ago, Knight did not believe there was any chance that high school basketball in California would be played before the academic year ends. But he said he changed his mind after listening to Grebing speak during a Zoom video conference with Bay Area coaches on Feb. 22.

“He came on and all he did was say let me tell you the argument we made with San Diego,” Knight said. “He probably took about seven minutes. After that, the next day, I went to Moreau. That was the first time I’d been in my office in like 350 days. Cleaned it up. I got up in the morning and packed a bag. I commuted to school like it was normal.”

The case in San Diego was filed on behalf of Nicholas Gardinera and Cameron Woolsey, two senior football players, who argued their rights to equal treatment were violated when professional and collegiate athletes were allowed to compete under certain protocols but not youth and high-school athletes.

Following an initial ruling in the athletes’ favor last month, similar lawsuits were filed by indoor-sports athletes in a number of other counties around the state, including San Francisco, San Mateo and Contra Costa counties. As part of negotiations to settle those lawsuits, Grebing said, the plaintiffs are asking for local health officials to commit to following the state guidelines and not institute stricter local orders.

Dr. Kevin Shea, the director of Sports Medicine at Stanford Children’s, said indoor sports bring more risk than those played outdoors but gave his endorsement for at least a limited return of athletics inside.

“Outdoor sports (are safe) with maybe some constraints on what we do,” Shea said. “Indoor sports, I think we have to look carefully at them. You may have to limit the fans in the stands indoors. The athletes, when they’re participating at a high level, allow them to potentially have their masks off but not while on the sidelines.”

Steven Dyer, the boys’ basketball coach at Campolindo High in Moraga, said he’d have his team on a court tomorrow if given the green light. A year ago, Campolindo beat De La Salle to win the Northern California Division I championship and advance to the D-I state final.

The state title game was canceled two days after the De La Salle game because of the virus.

“I am still a little fuzzy on the details of how this is all going to work,” Dyer said Thursday. “But, yeah, you go from having very little hope to I think a lot of hope now that we’re going to have a season. I am just really hopeful that our group this year will get some sort of season.”

Dyer said he started feeling optimistic as the football coaches made progress in their push to return to the field. Their two-month campaign ended Feb. 19 when the state announced the guidelines would be loosened to allow contact outdoor sports to return to competition.

“A lot of people with indoor sports were kind of discouraged by the announcement a few weeks ago,” Dyer said. “But I was like, ‘This is probably the first step.’ I was on these coaches’ calls the past few weeks with the Bay Area Coaches Alliance. Just hearing some of the people speak gave me more hope that there will be a season.”

Knight said he hasn’t seen his entire team since the Mariners lost to Monte Vista in the North Coast Section playoffs last season.

“It’s just really an opportunity for the kids to do something that they like to do,” Knight said. “Go out and enjoy it because really at this point, it’s really for them and their entertainment. There won’t be any state championships. There won’t be any league championships or section championships. It’s like this year you’re actually playing for the purest form of the game.”

Sue Phillips, the girls’ basketball coach at Archbishop Mitty in San Jose, called it “wonderful news” and said she is “optimistic for the first time in almost a year.”

But the longtime coach, whose team had advanced to the Open Division state championship game when last season abruptly ended, added, “As you know, we still need to hear our directive from Santa Clara County powers that be. While excited as I am about the prospects of it all, I think we have to sit and let this digest for a minute and figure out what the next steps are.”