Brandon Inge homered, Johnny Damon singled in the tiebreaking run in the sixth inning and the Detroit Tigers beat the Baltimore Orioles 4-2 Sunday to end a six-game skid and avoid a losing season.

Detroit won despite being outhit 9-6. The Tigers finished 81-81, only the second time in five seasons under manager Jim Leyland they failed to have a winning record.

Nick Markakis had three hits and an RBI for the Orioles, who for the seventh time this season failed to build upon a four-game winning streak. Manager Buck Showalter's team was bidding for its first four-game home sweep of Detroit since April 1992.

Orioles starter Brad Bergesen held Detroit hitless until Jhonny Peralta singled with one out in the fifth. Two batters later, Inge drove a 1-0 pitch into the left-field seats, his 13th homer of the season and second in two games.

One inning later, Will Rhymes led off with a double and scored on a single to center by Damon, who left for a pinch-runner. It might have been the last at-bat in a Detroit uniform for Damon, who signed a one-year contract in February.

Bergesen (8-12) allowed three runs and four hits in seven innings.

Detroit added an unearned run off Jim Johnson in the ninth.

Stuck without a rested starting pitcher because Detroit played doubleheaders on Wednesday and Friday, Leyland called upon Phil Coke, whose previous 157 appearances in the major leagues came out of the bullpen.

Coke gave up five hits, two runs and a walk in 1 2-3 innings. He was the first of six Detroit pitchers.

Daniel Schlereth (2-0) pitched 3 1-3 shutout innings and Jose Valverde worked the ninth for his 26th save.

The Orioles got a first-inning run when Robert Andino led off with a double and scored on a single by Luke Scott.

A run-scoring single by Markakis in the second made it 2-0 and chased Coke, who allowed six of the 11 batters he faced to reach base.

Notes: It isn't often that an umpire receives an ovation from the crowd, but Jerry Crawford was cheered by the fans when introduced before his final regular-season game over a 34-year career. ... The biggest cheer from the crowd of 23,914 came when the scoreboard posted the final NFL score of the Ravens' 17-14 win over Pittsburgh ... Peralta's fifth-inning single snapped an 0-for-11 slump. ... Scott walked three times and picked up his second steal of the season. ... It was only the second time in Tigers history they finished at .500. The other time was 1958.