The Baltimore Orioles ended five weeks of often frustrating trade talks by acquiring slugger Glenn Davis from the Houston Astros yesterday for a trio of 24-year-olds: pitchers Pete Harnisch and Curt Schilling and outfielder Steve Finley.

Now they must find a place to play and a way to pay Davis, a 29-year-old first baseman who likely will make more than $2 million in 1991 and is eligible for free agency following the season.

Orioles officials reacted gleefully to the deal, saying that they entered the offseason seeking a pair of run-producing hitters and now -- with the earlier signing of free agent Dwight Evans -- they've fulfilled their need. Playing home games in the cavernous Astrodome, Davis slammed 166 home runs in just more than six seasons with the Astros, including 22 last year during an injury-shortened campaign in which he hit .251 with 64 RBI in 93 games.

He averaged more than 30 homers during his four full seasons in Houston, and only two National Leaguers (Darryl Strawberry and Eric Davis) totaled more over the past five seasons. Within the comparatively cozy confines of Memorial Stadium, the Orioles envision 35 to 40 home runs from their new addition.

Manager Frank Robinson immediately proclaimed Davis his cleanup hitter. "We felt like we had to add two quality offensive players to our ballclub," he said. "I feel like we've done that. . . . Glenn Davis is capable of doing big things for us."

The Orioles recently seemed on the verge of making this trade for the three players they surrendered plus reliever Mark Williamson. The Astros, with owner John McMullen trying to sell the team, are ridding themselves of high-priced veterans, and Davis was seeking a four- or five-year contract worth about $4 million per season.

Harnisch, Schilling and Finley together made slightly less than $350,000 last season; Davis earned $1.985 million.

Talks between the two clubs began at last month's winter meetings, when the Orioles failed to sign one of the free agents they coveted most, former Astro Franklin Stubbs, who signed with Milwaukee.

Houston once sought first baseman Randy Milligan or second baseman Bill Ripken in the deal, sources said, but the Orioles refused to include either. Baltimore's top minor league prospect, pitcher Arthur Rhodes, also was mentioned.

According to sources, the trade was nearly set just before Christmas, but Baltimore officials were wary of Davis's salary. When the Astros finally were willing to make the deal without Williamson, however, the Orioles apparently could no longer resist.

"You always have mixed feelings when you have to say goodbye to someone that's been an integral part of your ballclub for a 10-year period," said Houston General Manager Bill Wood, whose club has traded Davis and permitted free agents Stubbs, Terry Puhl, Dave Smith, Danny Darwin, Larry Anderson and Juan Agosto to leave since the end of last season.

"Glenn signed in 1981, came up through our system and certainly developed into the power hitter we hoped he would be," Wood said. "You hate to say goodbye to a solid individual of that caliber. On the other hand, his value becomes more important on the trade side in the midst of a rebuilding program. We've helped ourselves immensely with three individuals, who are highly regarded."

Right-hander Harnisch led Baltimore's staff with 31 starts and 188 2/3 innings last year, but he finished 11-11 with a 4.34 ERA and was inconsistent. The Orioles shunned trade offers for him all season, but Robinson said the presence of Ben McDonald and the late-season emergence of Anthony Telford and Jose Mesa "helped us say okay" to giving up Harnisch.

"I'm a little bit down," said Harnisch, who's scheduled to depart Saturday on an Orioles-sponsored Caribbean cruise. " . . . I liked being here. I have a lot of respect for everyone here. . . . It's not an easy thing, but I'm looking ahead, not behind."

Finley always was a favorite of Baltimore officials, but he failed to prove he could hit on the major league level. He played in 142 games last season (second-best on the team to Cal Ripken Jr.) and hit .256. He's an exceptional defensive player at any of the outfield positions, though, and probably will be best-remembered by the Orioles for a spectacular Opening Day catch against the right field wall that set the tone for Baltimore's magical 1989 season.

"I have nothing but positive memories here," said Finley, who was working out at Ripken's house when General Manager Roland Hemond called to deliver the news. "If you're going the leave a place, that's the way to do it."

Schilling, acquired by the Orioles from the Boston Red Sox as part of the Mike Boddicker trade in 1988, had a 2.54 ERA in 35 relief appearances last season. But some in the organization questioned his maturity and commitment, and the Orioles probably were not going to be able to find a spot for him as a starter.

Baltimore's first order of business with Davis is to talk contract. His '91 salary will be determined by an arbitrator if an agreement cannot be negotiated quickly. "We are going to start immediately negotiating with Davis and his agents," Orioles President Larry Lucchino said. "Right now, we want to celebrate the moment."

Then Robinson has to find a position for him. The Orioles already have Milligan and David Segui at first, and Evans was to be a part-time right fielder, part-time designated hitter.

"At this point, my position is first base, and I think I've made tremendous strides there," said Davis, who will be 30 in March. "Whatever Frank wants me to do, if it'll help the club, I'm willing. But I think the Orioles would want me to play first base."

Said Robinson: "The idea is to get the best possible talent. It's my responsibility to get them at-bats and playing time, and I feel I can."