(FOX40.COM) — A California legislator ended up in the hospital after getting injured during a softball game with his fellow lawmakers.

The office of Assemblymember Matt Haney (D-San Francisco) confirmed that he suffered a dislocated hip during the game, which was held at Sutter Health Park in West Sacramento.

Several Democratic and Republican legislators played in the annual softball scrimmage on Monday night, which pitted lawmakers from Northern California against lawmakers from Southern California.

The annual game has been going on for 20 years, and this year’s game raised funds for Sacramento’s Mustard Seed School, which primarily educates children from unhoused families.

“We battle it out in the Capitol most days, but tonight we’re out at the softball field having some fun,” said Assemblymember Kevin McCarty (D-Sacramento).

This year, some Southern California legislators who were originally scheduled to play canceled in order to help their districts recover from the rain, flooding and damages from Tropical Storm Hilary.

Haney had to go to the hospital after his injury, and he was accompanied by Assemblymember Ash Kalra (D-San Jose).

But his injury did not take him out of the legislative game for long; Haney’s office said he was feeling “great” on Tuesday and that he was present for a committee hearing.