BALTIMORE — Sam Perlozzo was fired as manager of the Orioles on Monday, the result of his inability to bring last-place Baltimore out of a lengthy funk culminated by an eight-game losing streak.

Bullpen coach Dave Trembley will be the interim manager when the Orioles begin a six-game trip in San Diego on Tuesday. One of the leading candidates to fill the position on a full-time basis is Joe Girardi, voted NL manager of the year in 2006 before being fired after a dispute with ownership.

On another front, the Orioles are negotiating with former Chicago Cubs president Andy MacPhail about becoming chief operating officer, a job left vacant since Joe Foss resigned earlier this year.

Perlozzo was victimized by an underachieving bullpen and an unproductive offense that ranks last in the AL in home runs. Baltimore was 27-27 and second in the AL East on May 31 before losing 13 of 15 in June, including the last eight games of a 1-8 homestand that ended Sunday.

“We felt Sam was prepared, we felt the club was prepared to do battle every night,” executive vice president Mike Flanagan said in a news conference. “For whatever reason, it just wasn’t working.”

Baltimore’s 29-40 record is the fifth-worst in the major leagues. The Orioles started the day trailing first-place Boston by 15 1/2 games in the AL East.

Perlozzo joined Ray Miller, Mike Hargrove and Lee Mazzilli as Baltimore managers since Davey Johnson in 1997 who have failed to have a winning season.

“It’s always based on results,” Flanagan said. “It really gets down to wins and losses and expectations, and believing that this club is better than it looked.”

Perlozzo became the first major league manager to be fired this year.

The 56-year-old Perlozzo was told of the decision during a 20-minute discussion Monday with Flanagan and vice president Jim Duquette.

“As you might imagine, today has been a very difficult one for me and my family,” Perlozzo said in a statement.

“I am very disappointed that I will no longer be managing the Orioles. That being said, I wish them nothing but the best. I have been with the team for 12 seasons and I consider myself an Oriole. I believe that I have represented the club well during my time with them and I hope that the fans believe that, too.”

Trembley, 55, spent the last four of his 20 years as minor league manager in the Baltimore organization. He served as bench coach on occasion this season while Tom Trebelhorn returned to Arizona to tend to his ailing wife.

“We think Dave deserves a chance,” Flanagan said.