Samohi head coach James Hecht (left) and guard Jordan Mathews celebrate after winning the CIF State Regional final against Loyola on March 16. (Photo by Paul Alvarez Jr.)

The Pac-12 Conference is gaining one Santa Monica High basketball star and losing another.

As outgoing Vikings senior Jonah Mathews prepares for his collegiate career at USC, his older brother Jordan is leaving the California men’s basketball team after three seasons.

The elder Mathews announced Tuesday on Twitter that he won’t play his senior year with the Golden Bears. Instead, he’ll take classes at Berkeley this summer to complete his undergraduate work in legal studies and then pursue a master’s degree at another university. He has one remaining year of athletic eligibility.

“This decision was not easy but I am incredibly thankful for this experience,” he said.

It remains unclear where Mathews will go for his final season of collegiate basketball.

Mathews, who graduated from Samohi in 2013, has been a major contributor at Cal since being named the CIF Southern Section Division I player of the year as a high school senior. After playing in all 35 of the Bears’ games as a freshman, he started 32 of 33 games as a sophomore and played in all 34 of the team’s game this past season.

Mathews became Cal’s 3-point specialist, leading the squad in makes (89) during the 2015-16 campaign while shooting at a 41.6-percent clip. He leaves the program ranked fourth all-time in threes.

Mathews carved out a key role on a squad that featured NBA prospect Jaylen Brown and fellow freshman Ivan Rabb as well as Tyrone Wallace and Jabari Bird. The 6-foot-4, 203-pound guard averaged 13.5 points, 3.4 rebounds and 1.3 assists per game this past year, when the team earned its highest-ever NCAA Tournament seed at No. 4.

“Jordan has been a valuable member to our Cal basketball program for the past three years,” Bears coach Cuonzo Martin said in a statement. “As with any of our student-athletes, graduating from Cal is of paramount importance and I am happy Jordan is on track to earn his degree in legal studies this summer. Along with our entire staff, I wish him well in his future endeavors.”

Mathews was expected to have increased responsibilities next season with the Bears, who will be without Brown and Wallace.

His departure nullifies what would have been a brother-against-brother matchup when Cal faces USC next year. The Bears defeated the Trojans 87-65 in their only meeting this past season.

Mathews thanked the university, the men’s basketball staff and Bears fans for their support.

“The relationships I have developed will last a lifetime,” he said. “I will always be a Cal Bear and I will forever cherish my time in Berkeley.”

The younger Mathews, meanwhile, is gearing up for his first season at USC under coach Andy Enfield. He is part of a recruiting class that also includes fellow guard De’Anthony Melton and forwards Nick Rakocevic and Harrison Henderson.

The Trojans were 21-13 overall and 9-9 in league games this past season.