The 33-year-old, who scored 244 not out in the fourth test in Melbourne last week, received an ovation from the crowd after passing the milestone in the third over of England's second innings at Sydney Cricket Ground.
Cook, playing his 152nd test match, joined Sachin Tendulkar, Ricky Ponting, Jacques Kallis, Rahul Dravid and Kumar Sangakkara in accumulating 12,000 runs or more over his career.
(Lists under player, runs, average, centuries)
Sachin Tendulkar (India) 15,921 53.78 51
Ricky Ponting (Australia) 13,378 51.85 41
Jacques Kallis (S. Africa) 13,289 55.37 45
Rahul Dravid (India) 13,288 52.31 36
Kumar Sangakkara (S. Lanka) 12,400 57.40 38
Alastair Cook (England) 12,005 46.35 32
Australia were closing on an innings victory with England fighting a desperate rearguard on 93 for four at stumps on the fourth day of the fifth Ashes test on Sunday, still 210 runs from forcing their hosts to bat again.
Brothers Shaun and Mitchell Marsh had earlier both scored centuries on a scorching morning at the Sydney Cricket Ground to put Australia in a position where they could declare on 649-7 in the second session.
England, already 3-0 down in the series with the urn relinquished, had toiled in the field in temperatures in excess of 40 degrees Celsius with little success and their luck did not change when they came out to bat.
Openers Alastair Cook and Mark Stoneman went cheaply inside the first six overs of their second innings with James Vince (18) and Dawid Malan (five) following in the final session.
Skipper Joe Root, who made an unbeaten 42 despite playing with an injured finger, and Jonny Bairstow (17 not out) will take England's fight to save the test into the final day.
The Marsh brothers had earlier joined the Chappell siblings Ian and Greg (1972) and the Waugh twins Mark and Steve (2001) in scoring centuries in the same innings in an Ashes test.
(With inputs from AFP)
First Published: January 7, 2018, 4:32 PM IST