Kilmarnock took the victory, but it was Queen of the South who will grab most of the plaudits after coming close to forcing a Scottish Cup replay despite playing nearly 90 minutes with 10 men.
Stephen McKenna was sent off for a rash early challenge and Cillian Sheridan fired Killie ahead on eight minutes.
Borja pounced on Sheridan's cross to extend the lead in the second half.
Nicky Clark headed a reply eight minutes later, but it was not enough for the Second Division side.
And it is their Scottish Premier League opponents who march on slightly fortuitously to the fifth round after a cup thriller at Rugby Park.
Those looking for a Scottish Cup fairytale had their eyes set on Ayrshire, with the visitors managed by former Kilmarnock hero Allan Johnston, riding high in Division Two, having accounted for Hibernian and Rangers in knock-out competitions this season and being unbeaten in 10 away games this season.
Scottish Cup history also favoured Queens, who had lost only once in nine meetings between the sides in the tournament, albeit their last encounter came 23 years ago.
However, it was their most recent meeting that provided the most telling omen.
Last September, Kevin Smith's early dismissal was held responsible for the comprehensive nature of the Dumfries side's League Cup exit.
This time, it was McKenna's turn to be the villain with a rush of blood to the head and his late challenge led to Borja requiring treatment and Mike Tumilty waving what many considered a harsh red card.
Queens goalkeeper Lee Robinson had already had to prove his reflexes with a fine double save by the time Killie made what looked like an inevitable breakthrough.
Sheridan met Borja's corner at the back post to continue his scoring streak since arriving at Rugby Park.
However, Kilmarnock, minus the talismanic Manuel Pascali through suspension, laboured to take advantage of their extra man and Queens, wearing a black and white strip more associated with Killie's local rivals, Ayr United, ought to have been level by half time.
It was perhaps no surprise that former Ayr defender Chris Mitchell looked particularly inspired by the occasion and tested goalkeeper Cammy Bell with a low free-kick before screwing wide another effort from the edge of the penalty box.
That latter move had come from a fine Clark break and the in-form striker also sent a looping drive over the top.
Queen of the South were fortunate not to go further behind when Gary Harkins' dipping 20-yard drive struck the face of the crossbar.
However, Killie were just as fortunate that Clark could only bundle the ball wide from six yards after Paul Burns had pounced on some slack home defending.
Killie came out with more purpose after the break and, during the early siege on the visitors' penalty area, Sheridan sent a header flashing across the face of goal and a powerful drive against the crossbar.
Yet Queens almost snatched an equaliser on the break, with Bell showing his international class with a point-blank stop to deny Derek Lyle.
Bell was the Killie hero again and his save from close range from Ryan McGuffie led to the second goal that virtually killed the tie.
The home side immediately broke to the other end, where Sheridan's low cross was poked into the corner of the net off Borja's outstretched toe.
Queens just would not accept defeat and Clark headed home from five yards following a McGuffie cross.
However, while they must take credit from avoiding a repeat of the 5-0 thrashing they suffered at Rugby Park last season, they had given themselves too much of a mountain to climb and the 10 men came up just short.
Live text and stats
Saturday, 1 December 2012
||Queen of Sth
QUEEN OF STH
- Kilmarnock 58%
- Queen of Sth 42%
Attempts on target
- Kilmarnock 10
- Queen of Sth 3
Attempts off target
- Kilmarnock 4
- Queen of Sth 3
- Kilmarnock 8
- Queen of Sth 1
- Kilmarnock 9
- Queen of Sth 8
- Final Result
- Full Time
- 90:00+3:35 The referee blows his whistle to end the game.
- Correction - 90:00+0:54 Substitution William Gibson comes on in place of Derek Lyle.
- Correction - 90:00+0:54 Substitution Gavin Reilly comes on in place of Daniel Carmichael.
- 90:00+0:54 Substitution Christopher Mitchell goes off and William Gibson comes on.
- 90:00+0:54 Substitution Gavin Reilly comes on in place of Daniel Carmichael.
- 87:20 Kevin Holt fouled by Michael Nelson, the ref awards a free kick. The free kick is delivered right-footed by Christopher Mitchell
from right channel, comfortable save by Cameron Bell.
- Correction - 85:42 Substitution Kevin Holt on for Ryan McGuffie.
- Correction - 85:42 Substitution Ross Davidson replaces Paul Heffernan.
- 85:42 Substitution Kevin Holt comes on in place of Ryan McGuffie.
- 85:42 Substitution (Kilmarnock) makes a substitution, with Ross Davidson coming on for Paul Heffernan.
- 82:40 Corner taken left-footed by James Dayton, Michael Nelson takes a shot. Save made by Lee Robinson.
- 80:22 Substitution James Dayton replaces Borja Perez.
- 77:40 Booking Booking for James Fowler for dissent.
- 76:39 Assist on the goal came from Ryan McGuffie.
- 76:39 GOAL - Nicholas Clark:Kilmarnock 2 - 1 Queen of South Nicholas Clark grabs a headed goal from close range. Kilmarnock 2-1 Queen of South.
- 74:19 Foul by Michael Nelson on Nicholas Clark, free kick awarded. Christopher Mitchell restarts play with the free kick.
- 72:29 Booking Gary Harkins receives a caution.
- 70:52 Cillian Sheridan takes a shot. Save by Lee Robinson.
- 69:28 Substitution Rory McKenzie joins the action as a substitute, replacing Danny Racchi.
- 68:34 The assist for the goal came from Gary Harkins.
- 68:34 GOAL - Borja Perez:Kilmarnock 2 - 0 Queen of South Borja Perez grabs a goal from inside the six-yard box to the bottom right corner of the goal. Kilmarnock 2-0 Queen of South.
- 67:26 Inswinging corner taken right-footed by Paul Burns from the right by-line.
- 62:08 Effort on goal by Danny Racchi from just outside the penalty area goes harmlessly over the target.
- 61:35 Corner from the left by-line taken by Borja Perez, clearance by Nicholas Clark.
- 60:39 Foul by Derek Young on Danny Racchi, free kick awarded. Gary Harkins takes the direct free kick.
- 59:14 Corner taken by Borja Perez, Derek Young makes a clearance.
- 58:43 Borja Perez takes a shot. Blocked by Christopher Mitchell.
- 56:40 Free kick awarded for a foul by Gary Harkins on Ryan McGuffie. Lee Robinson restarts play with the free kick.
- 56:05 Derek Lyle takes a shot. Save made by Cameron Bell.
- 55:18 Cillian Sheridan takes a shot.
- 54:37 Headed effort from close range by Borja Perez goes wide left of the goal.
- 52:44 Inswinging corner taken right-footed by Borja Perez from the right by-line, clearance by Derek Lyle.
- 51:34 Daniel Carmichael is adjudged to have handled the ball. Gary Harkins has a direct shot on goal from the free kick.
- 48:46 Foul by Michael Nelson on Nicholas Clark, free kick awarded. Mark Durnan restarts play with the free kick.
- 45:01 The second half begins.
- Half Time
- 45:00+1:42 The whistle is blown to end the first half.
- 45:00+1:17 Nicholas Clark has an effort at goal from deep inside the area missing to the left of the target.
- 44:52 Booking Derek Lyle receives a yellow card for dissent.
- 44:15 Gary Harkins takes a shot.
- 42:08 Cillian Sheridan is ruled offside. Lee Robinson takes the free kick.
- 41:00 Foul by Christopher Higgins on Cillian Sheridan, free kick awarded. Borja Perez produces a strike on goal direct from the
free kick, save made by Lee Robinson.
- 40:35 Centre by Christopher Mitchell, Cameron Bell makes a comfortable save.
- 39:15 Effort on goal by Nicholas Clark from outside the penalty box goes harmlessly over the bar.
- 38:42 The assistant referee flags for offside against Cillian Sheridan. Lee Robinson takes the indirect free kick.
- 37:39 Christopher Higgins concedes a free kick for a foul on Paul Heffernan. Direct free kick taken by Borja Perez.
- 34:24 Ryan McGuffie has an effort at goal from just inside the box that misses to the left of the goal.
- 32:05 James Fowler fouled by Derek Lyle, the ref awards a free kick. James Fowler takes the direct free kick.
- 28:43 Foul by Danny Racchi on Lee Robinson, free kick awarded. Lee Robinson takes the direct free kick.
- 22:30 Free kick awarded for an unfair challenge on Nicholas Clark by James Fowler. Direct free kick taken by Christopher Higgins.
- 18:39 Free kick awarded for an unfair challenge on Nicholas Clark by Jeroen Tesselaar. Strike on goal comes in from Christopher
Mitchell from the free kick, save made by Cameron Bell.
- 17:35 Derek Young gives away a free kick for an unfair challenge on Jeroen Tesselaar. Borja Perez crosses the ball, Cillian Sheridan
takes a shot. Comfortable save by Lee Robinson.
- 15:33 Inswinging corner taken right-footed by Borja Perez from the right by-line.
- 15:05 Lee Johnson takes a shot. Blocked by Mark Durnan.
- 14:33 Inswinging corner taken by Borja Perez from the left by-line, Ryan McGuffie makes a clearance.
- 13:07 Jeroen Tesselaar challenges Ryan McGuffie unfairly and gives away a free kick. Lee Robinson restarts play with the free kick.
- 10:01 Booking Ryan O'Leary goes into the referee's book for unsporting behaviour.
- 9:43 Free kick awarded for an unfair challenge on Daniel Carmichael by Ryan O'Leary. Direct free kick taken by Christopher Higgins.
- 9:01 Borja Perez takes a outswinging corner.
- 7:58 Borja Perez provided the assist for the goal.
- 7:58 GOAL - Cillian Sheridan:Kilmarnock 1 - 0 Queen of South Cillian Sheridan finds the net with a goal from close in to the bottom right corner of the goal. Kilmarnock 1-0 Queen of South.
- 7:28 Corner taken by Borja Perez,
- 3:57 Ryan O'Leary takes a shot. Save made by Lee Robinson.
- 3:35 Paul Burns concedes a free kick for a foul on Borja Perez. Borja Perez takes the free kick.
- 1:35 Free kick taken by Lee Johnson.
- 1:35 Sent off Stephen McKenna receives a red card.
- 1:25 Stephen McKenna challenges Danny Racchi unfairly and gives away a free kick.
- 1:03 Free kick awarded for a foul by Paul Burns on Borja Perez. Jeroen Tesselaar restarts play with the free kick.
- 0:00 The referee gets the match started.
Live text and data provided by The Press Association.