Blackburn Rovers 3 Cardiff City 2
After seeing off the stubborn challenge of Cardiff City in the third round replay, Rovers will now entertain Colchester United.
But Rovers made life difficult for themselves with a poor performance in front of a crowd of just 9,140.
They made the perfect start with a glorious goal after just ten minutes, Thompson hitting his first-time shot beyond Tony Warner after good link-up play between Lucas Neill and Paul Gallagher.
Rovers had further chances to extend their lead, not least a shot from Pedersen that was tipped over by Warner, before Cardiff drew level in the 25th minute.
The Blackburn defence was caught sleeping and Jobi McAnuff nipped in to fire a shot beyond Brad Friedel.
Seven minutes later Rovers were back in front when an attempted cross from Thompson beat the Cardiff defence before bouncing over the stranded Warner.
When Pedersen got on the end of a cross from Neill two minutes into the second half to make it 3-1 the tie looked over.
Cardiff though had other ideas and when James Collins scored at the second attempt in the 58th minute it was game on.
Richard Langley wasted a great chance to pull the Welshman level in the 73rd minute when he blazed over the bar from six yards and substitute Tony Vidmar also came within inches of a spectacular leveller late on.
Blackburn responded and it took a superb save from Warner to keep out a hat-trick attempt by Thompson in stoppage time.