MIAMI (AP) — Ike Davis hit his 32nd homer and Scott Hairston got his 20th Wednesday to help the New York Mets win their season finale by beating the Miami Marlins 4-2.

Jeremy Hefner (4-7), who hopes to make the Mets’ roster in 2013, closed the season with his second consecutive strong start. He allowed two runs in 7 1-3 innings.

READ MORE: 1 Dead, 2 Hospitalized Following Shooting In Hialeah Gardens

For both teams, the game marked the end of disappointing seasons. The Mets (74-88) finished fourth in the NL East for the fourth year in a row. The Marlins (69-93), touted as playoff contenders after an offseason spending binge, instead posted their worst record since 1999.

Miami heads into the offseason with questions about the future of manager Ozzie Guillen and president of baseball operations Larry Beinfest. Both are under contract through 2015, but owner Jeffrey Loria hasn’t ruled out changes at the top.

Guillen acknowledged his job is in jeopardy, even though he has been with the team for only one year.

The Mets believe they’re on the upswing after the settlement of a suit stemming from the Bernard Madoff Ponzi scheme. General manager Sandy Alderson said the Mets will make “every effort” to reach long-term deals with third baseman David Wright and 20-game winner R.A. Dickey, and the team may be more active this offseason in the trade and free-agent markets.

A new ballpark failed to improve the fortunes of the Marlins, who finished below .500 for the third year in a row.

Attendance was better, however. With a crowd of 27,418 for the finale, the Marlins drew more than 2.2 million fans, 12th-best in the NL but their highest total since 1997.

READ MORE: Three People Rescued From Giant Tank At Homestead Fish Farm

The Mets were hardly a long-ball team this season, but they showed some muscle in the finale. Hairston reached the 20-homer milestone for the first time. Andres Torres hit his third homer.

Wright went 0 for 2 before leaving the game and finished at .306. Davis, whose average dipped to .158 in June, ended up at .227.

New York’s Lucas Duda was hit in the back of the helmet by a 79-mph curve from Dan Jennings in his final at-bat. Duda walked to first but was then taken out of the game.

Miami’s Jose Reyes swiped second base in the sixth to reach 40 steals for the fifth time, and the first time since 2008.

Hefner gave up a double by Bryan Petersen to start the game, then retired the next 13 batters. Bobby Parnell pitched a scoreless ninth for his seventh save in 12 chances.

Rookie Tom Koehler (0-1), making his first major-league start, gave up three runs in six innings.

MORE NEWS: CDC Investigating Ground Turkey Products After Salmonella Cases Surface

(© 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)