To raise money to buy CIF championship rings, the San Fernando baseball team started selling T-shirts. That’s before comedian George Lopez stepped in.

Lopez, who graduated from San Fernando High School in 1979 and played on the baseball team, told coach Armando Gomez he wanted to buy the players their rings. That amounts to about 30 rings, for players and coaches, to the tune of $400 apiece or $12,000 total.

The only stipulation, Gomez said, was that Lopez wanted a ring for himself.

“I was so grateful for the generosity he’s shown toward us,” Gomez said. “I told him, ‘You can have whatever you want.’ ”

San Fernando won the CIF City Section championship by beating Chatsworth, 8-6, at Dodger Stadium last Saturday. It was the first City title for San Fernando since 1991. Gomez said the 1991 team doesn’t have a championship banner at the school. He wants to be able to buy two banners, one for the 2011 team and one for the 1991 team.

The T-shirts his team is still selling to raise money for equipment and supplies recognizes the 2011 championship and the 20th anniversary of the 1991 championship.

Gomez was in his team’s clubhouse grading papers Wednesday when Lopez called him. The two talked about how San Fernando was seeded so low -- the team was the sixth seed – even though the Tigers tied Kennedy of Granada Hills for first place in the Valley Mission League standings.

Gomez said Lopez told him, “It’s good these kids learned how to overcome obstacles in life.”

San Fernando eliminated second-seeded El Camino Real, the 2010 City champions, in the semifinals at USC before winning the City title over top-seeded Chatsworth.

Gomez invited Lopez to attend the team’s alumni game at the start of the season. But the game was rained out three times. Gomez said he had a jersey made for Lopez with his old number on it, but he was never able to give it to him.

When Gomez told Lopez about the jersey, Lopez sent his assistant over to the school to pick it up. He wanted to wear it as soon as he could.

Lopez’s excitement about his alma mater winning a City championship didn’t fade. On Friday, Gomez said Lopez invited the players to his show, “Lopez Tonight” on TBS, so he could give the players their rings. The rings won’t be ready for about 10 weeks. Gomez said to look for the San Fernando High baseball players to get their rings on “Lopez Tonight” in mid-August.