BALTIMORE — A huge crowd, a well-pitched game and the appearance of a local legend provided the Baltimore Orioles with a rare feel-good moment during a very unenjoyable season.

Rookie Yefry Ramirez and four relievers combined on a four-hitter, Jonathan Schoop drove in a run with a sixth-inning sacrifice fly and the Orioles beat the Texas Rangers 1-0 Saturday night in a matchup of last-place teams.

In part because of a promotional giveaway (Maryland script flag jerseys), a crowd of 38,328 came to support the club with the worst record in the big leagues. Also in attendance: Hall of Fame third baseman Brooks Robinson , the 81-year-old former Oriole was introduced as the team's new special adviser.

And so, on a perfect night for baseball, Baltimore fans were treated to a victory and a bit of nostalgia.

"It's been a tough season so far for our fans," Orioles manager Buck Showalter conceded. "Getting a chance to see Brooks, that's a highlight of any day or any season, really."

So was the win. Making his fourth start and bidding for his first major league victory, Ramirez pitched five innings of two-hit ball before being pulled in a scoreless game.

Brad Brach (1-2), Donnie Hart and Mychal Givens followed before Zach Britton worked the ninth for his third save.

It was pretty special, especially for a team that came in with collective 4.92 ERA.

"Yeah, absolutely," Britton said. "When I got out to the bullpen today, I was like, 'Oh, I know it's a giveaway but we got a nice crowd on hand and they're into it.'"

Brach, Britton, shortstop Manny Machado and centre fielder Adam Jones are among those likely to be dealt by the last-place Orioles before the July 31 non-waiver trade deadline.

After languishing on the disabled list for 11 weeks, Rangers lefty Martin Perez (2-4) allowed one run and five hits over seven innings in his first start since April 29. It was the best of his six starts this season, but he didn't get a win to show for it.

"It was a good outing for me," Perez said. "To come back after two months and a half and throw again like this, make me happy."

Neither team got a runner to third base until the sixth inning, when the Orioles scored on a walk, an infield hit and a sacrifice fly by Schoop .

The Rangers used a single and an error to get two on with no outs in the eighth. But pinch-runner Isiah Kiner-Falefa was picked off second base, and the uprising fizzled from there.

"We stranded eight runners and made a base-running mistake that hurt us late," manager Jeff Bannister said.

Texas designated hitter Shin-Soo Choo went 1 for 2 with two walks, extending to 50 his team-record streak of games reaching base via a hit, walk or hit by pitch. He is the seventh player since 2001 to have a run of 50 games and the first since Kevin Millar in 2007.

On the opposite end of the spectrum, teammate Delino DeShields went 0 for 2 and is hitless in his last 25 at-bats since July 4.

TRAINER'S ROOM

Rangers: To make room for Perez, LHP Alex Claudio (left ankle sprain) was placed on the 10-day DL and OF Austin Jackson was released. ... Manager Jeff Banister said C Carlos Perez, who's been sidelined since mid-June with a right ankle sprain, will finish his rehab assignment on Tuesday. The team will then decide whether to bring him off the DL.

Orioles: RHP Jimmy Yacabonis is too sick to make his scheduled start Sunday, manager Buck Showalter said. Yacabonis was slated to start for injured Andrew Cashner (neck spasms). RHP Chris Tillman, who is slated to conclude his rehab assignment Sunday with Triple-A Norfolk, is an option.

UP NEXT

Rangers: LHP Mike Minor (6-5, 4.56 ERA) takes Texas into the All-Star break, pitching the series finale Sunday. The 30-year-old will seek to add a notch to his team-leading victory total.

Orioles: The All-Star break can't come soon enough for the Orioles (27-69), who last year lost their 69th game on Sept. 7.

______

More AP baseball: https://apnews.com/tag/MLBbaseball