Lancashire were also indebted to Haseeb Hameed, the 19-year-old opener who followed up making a maiden first-class century against Warwickshire last week by scoring 89 at Lord’s in almost five hours at the crease.
He and Petersen added 97 for the third wicket before Hameed edged Toby Roland-Jones to first slip where Sam Robson clung on at the second attempt.
Hameed has made an excellent impression at the top of Lancashire’s order this season with 469 championship runs at an average of 39, and here, after fellow opener Tom Smith was lbw to James Franklin for 17, he was joined by Luke Procter in a second-wicket stand of 65 in 23 overs.
Procter contributed a busy 45 from 61 balls before being well held low down by Ollie Rayner at second slip off Tim Murtagh.
Petersen then came in to help Hameed ensure first-day honours went Lancashire’s way.
Hameed, well-organised and patient, took three hours and 137 balls to reach his fifty, even though he had included a hooked six off Roland-Jones.
He did bat more fluently once he had completed his half-century and was only seriously discomfited when Roland-Jones made one bounce steeply at him on 85, the ball catching the shoulder of the bat as Hameed tried to fend it off and flying away over the slips for the right-hander’s 12th four.
Three balls later he was gone, as Roland-Jones finished off a hostile over by finding the edge of Hameed’s bat.
It proved to be the last success of a tough day for Middlesex’s bowlers, however, as Petersen and Steven Croft flourished, putting on an unbroken 100 for the fourth wicket and also keeping out the new ball taken at 259 for three.
Petersen reached the 41st century of his first-class career with a short-armed jab towards square leg off James Fuller.
He had faced 159 balls, hitting four fours and a six. Two of those boundaries took him to 82 and came from successive balls by off spinner Rayner - the first hit to wide mid-wicket for four and the second swung clean over the ropes.