Jason Gillespie resigned from his role as coach of the Pakistan Test team on Thursday after refusing to join the squad on their tour of South Africa over disagreements with the country's cricket board.
The former Australia bowler was appointed head coach on a two-year deal in April, with former South Africa opener Gary Kirsten named white-ball coach. Kirsten resigned in October for similar reasons.
The Pakistan Cricket Board (PCB) confirmed Gillespie's resignation. "The PCB has named former Pakistan paceman Aaqib Javed as interim red-ball head coach following the resignation of Gillespie," a PCB statement said.
Aaqib, who also replaced Kirsten as interim white-ball coach, will now oversee the two-Test series in South Africa, starting in Centurion from 26 December. The second Test will be played in Cape Town from 3-7 January.
Pakistan's white-ball squad is currently in South Africa for a three-match T20 series and three one-day internationals.
Gillespie was removed from the selection panel following Pakistan's 2-0 whitewash at the hands on Bangladesh in September and losing the first Test by an innings against England a month later.
Pakistan won the next two Tests against England, taking the series 2-1, on sharply spinning pitches. Gillespie did not hide his sentiments, saying he was frustrated.
"I think there's always frustrations from time to time," Gillespie said, in an interview with Sky Sports during the second England Test. "It wasn't what I signed up for, I'll be completely honest."
After the England series, Gillespie served as white-ball coach on Pakistan's tour of Australia but was not given the job for the series in Zimbabwe.
Gillespie was reportedly not happy after the contract of his assistant Tim Nielsen was not renewed by the PCB.
Pakistan have a history of sacking coaches in the recent past. They have had six different coaches in all formats in the last four years.