Captain Barry (second right) scored Villa's second goal
Aston Villa were left to settle for an Intertoto Cup place after drawing an entertaining game at West Ham, as Everton won to claim fifth place.
Ex-Villa winger Nolberto Solano put the Hammers ahead against his old club with a free kick from the edge of the box.
The visitors soon hit back when Nigel Reo-Coker fed Ashley Young, who slotted past Robert Green to equalise.
Gareth Barry then put Villa ahead after Reo-Coker's shot was parried, but Dean Ashton ensured honours finished even.
Interview: West Ham boss Alan Curbishley
Only an Everton defeat, coupled with a Villa victory, would have lifted Martin O'Neill's side above the Toffees - but both sides here contributed to a game packed with chances.
It was also a swansong for Juventus-bound defender Olof Mellberg, whose parting gift was to buy a Villa shirt for each of the 3,200 travelling fans, emblazoned "Mellberg - Thanks 4 Your Support" - while some away fans donned Swedish colours in his honour, and others basked, shirtless, in the heat.
Interview: Martin O'Neill
After the kick-off was delayed as a number of balloons on the pitch needed to be burst, the Hammers soon won the first corner - but Villa broke quickly and Gabriel Agbonlahor crossed for Young to rattle the post as the visitors served early notice of their intentions.
West Ham won a free-kick just outside the box in the sixth minute and as Solano lined up the shot, keeper Scott Carson took a while to arrange his defensive wall.
However, the little Peruvian's effort curled over and around the seven-man wall, and although Carson got a hand to it, he could not prevent the first Premier League goal of the afternoon.
But Villa hit back within minutes as ex-Hammers midfielder Reo-Coker - roundly booed by his old club's fans - slid a ball through for Young to delicately pass into the net beyond Green's reach.
The news of Everton taking the lead at Goodison Park may have dampened the Villa fans' spirits, although they were nearly gifted a second goal when Green slipped attempting a clearance with Young lurking.
And the outstanding Young, named on Friday as the top flight's player of the month for April, looked the most likely player on either side to create something special, especially when he cut in from the left flank.
Solano gave West Ham an early lead against his former club
By contrast, West Ham's left-winger Luis Boa Morte, without a goal all season, volleyed well wide for the hosts as half-time approached.
He did better after the interval as Villa backed off and allowed him to run and shoot from distance, only for Carson to block.
Villa kept pressing and it needed a goal-line clearance by Mark Noble to keep out Carew's shot from a tantalising Young corner.
And it was no more than the Midlanders deserved when captain Barry, the subject of a very public transfer bid from Liverpool, burst through the middle and carved open the defence to play Reo-Coker through.
Although Reo-Coker's shot was parried by Green, Barry was perfectly placed to steer home the rebound in front of the travelling fans.
With Everton having only just conceded an equaliser, it gave Villa brief hope of a late shot at fifth place - although the Toffees were soon ahead again.
But back at Upton Park, West Ham refused to lie down - and at the other end Mellberg did well to block an Ashton effort, while Zamora then crashed a header against the Villa bar.
Mellberg almost enjoyed a fairytale finale to his Villa career when he stormed forward from right-back, only to fire into the side netting.
James Tomkins had to make two vital blocks as Villa pushed for a third, while Green also needed treatment after colliding with giant striker Carew.
Interview: Olof Mellberg
However, news of a third Everton goal appeared to have filtered through to the Villa fans - and even the players, as both sides finally looked to have run out of steam in the dying minutes.
But with Villa's Uefa hopes gone, with two minutes left Ashton drilled in a shot from just outside the area to earn his side a share of the points.
Villa nearly won it in stoppage time when substitute Carlton Cole, trying to clear, chested Young's shot towards his own goal-line before it was hacked clear - but it meant honours finished even after a pulsating game on a baking afternoon.
West Ham manager Alan Curbishley: "I've said all along how well my players have done. We let ourselves down in a couple of games but in the main we have done well despite having to contend with a lot of problems.
"Every club has its problem over sides wanting to buy their players, look at Tottenham.
"Fans saw last summer that we had players coming in rather than leaving. We're hoping to build on that, I'm not under pressure to cut costs."
Aston Villa boss Martin O'Neill: "I'm very pleased with the team because we've taken big strides since last season.
"It's disappointing we've missed out on the Uefa Cup but with Everton beating Newcastle it doesn't seem so bad.
"We're in the Intertoto Cup for definite now, which means we have to play 17 games in the middle of June!
"What it really means is that we have to be back a week earlier and be competitive sooner than expected because the ties are mid to late July."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.