SAN LORENZO -- The San Lorenzo High boys soccer team got the result it needed Friday as it finished the regular season with a dramatic 1-1 tie against visiting Hayward to capture the West Alameda County Conference-Shoreline Division championship.

With only moments remaining in stoppage time in the second half and San Lorenzo trailing 1-0, the Rebels' Jonathan Lopez was fouled in the penalty area. He then picked himself up off the turf and buried the league-winning goal into the right side of the net.

San Lorenzo (12-4-4, 11-3-2 WACC), which came into Friday with a three-point lead in the Shoreline Division standings, needed just a draw to capture the championship and clinch an automatic berth into next week's North Coast Section Division II playoffs. Seedings for the postseason will be announced Sunday.

"We were knocking on the door and I felt we deserved a goal," Lopez said. "We worked so hard all season and winning league feels great."

Hayward (14-3-7, 9-2-5) needed a win to even things up at the top of the table, and was off to a good start when Marco Udave converted a penalty kick just five minutes into the first half to give his team a 1-0 lead. But the Farmers, which would have owned the tiebreaker over the Rebels with a victory after the two teams tied in their first meeting, couldn't prevent the equalizer despite holding San Lorenzo scoreless for 80-plus minutes.

It's San Lorenzo's second league title in four years after it captured the championship in the now-defunct Hayward Area Athletic League in 2011. Hayward won the HAAL crown in 2012 and were Shoreline Division champs last season.