|LV= County Championship Division One, Wantage Road|
|Close, day two: Northants 312 & 51-3, Warwickshire 602-9 dec|
|Warwickshire 7pts, Northants 4pts|
Teenager Sam Hain became the youngest Warwickshire player to hit a first-class century as the Bears got right on top against Northants at Wantage Road.
The 18-year-old, on 87 overnight, went on to make 134 as the Bears declared on 602-9 after number nine Barker (102 not out) had also reached three figures.
But there were contributions all the way down the order as Northants were set 290 to avoid an innings defeat.
Chris Woakes took three quick wickets before the visitors closed on 51-3.
Opener James Middlebrook (29 not out) and Matt Spriegel (10 not out) stopped the rot with an unbroken stand of 35 after England all-rounder Woakes had reduced the home side to 16-3.
But Division One's winless bottom side Northants now have a tough fight on their hands if they are to prevent their sixth defeat in seven Championship matches this season.
Although Barker made his first century of the summer - his fourth in first-class cricket - the day still belonged to Hong Kong-born Australia Under-19 international Hain.
In becoming the Bears' youngest-ever centurion, Hain broke a record set by England's Ian Bell 13 years ago.
Resuming on their overnight score of 274-4, Hain lost Tim Ambrose early on, but he was well supported by Rikki Clarke, who made 46 in a stand of 86.
Woakes (49) and Jeetan Patel (34) also weighed in with useful scores as the entire Bears' tail wagged to splendid effect.
BBC Radio Northampton's Chris Egerton:
"A dismal day for Northants who had to toil long and hard in the field as Warwickshire posted their highest-ever score against them.
"The morning was dominated by Sam Hain. Born in Hong Kong and brought up on the Gold Coast, he is a self-described "fair dinkum Pom" but he plays with good temperament and no little technique. Many view him as the next England batsman to come through the Edgbaston system after Ian Bell and Jonathan Trott.
"After Hain fell, Northants' fielding became ragged under pressure while a collection of lower order partnerships ensured Keith Barker reached his hundred despite a leg injury.
"It is not impossible to imagine Northants batting out the final day to avoid defeat with seven first innings wickets to defend, especially on a flat pitch, but there is an air of resignation among the members that a sixth defeat in seven looks more likely unless they can summon up some heroics from somewhere."