CARSON, Calif. — Zlatan Ibrahimovic had a hat trick and broke Los Angeles' season goal record with 26 in the Galaxy's 7-2 victory over Sporting Kansas City on Sunday night.

The 37-year-old Swedish star tied it at 1 in 32nd minute to match the goal record set by Carlos Ruiz in 2002, then gave Los Angeles (14-13-3) a 3-1 lead in the 51st to break the mark and completed the hat trick in the 85th.

Los Angeles snapped a four-match winless streak to move into fifth place in the Western Conference, a point ahead of San Jose and two in front of Portland.

Ibrahimovic scored his first goal on a rebound after goalkeeper Tim Melia stopped his penalty kick, then beat Melia with a left-footer from close range to break the record. He also scored the final goal on a left-footer.

Joe Corona gave Los Angeles the lead in the 48th minute on a header off Cristian Pavón's high chip. Uriel Antuna added a goal in the 69th, and Sebastian Lletget struck in the 77th and 79th minutes.

Felipe Gutiérrez scored twice for Sporting (10-13-7).