Following a fact-finding tour of the USA by NER General Manager George Gibb the company decided to increase the size of freight trains, consequently needing more powerful locomotives. The new class P2 (LNER J26) engines were and enlargement of the existing P1 0-6-0 goods engine (LNER J25), the boiler being much larger with a longer firebox and quite obvious increase in boiler diameter along with an increase in working pressure.
50 class P2 locomotives were built in 1904/5 at Darlington and Gateshead before the boiler design was slightly revised in 1906 due to the new firebox causing excessive heating of the rear axleboxes making the next batch of new engines class P3 (LNER J27).
As the existing P2/J26 boilers required significant repairs they were altered to the new pattern. Under LNER ownership the two classes were visually almost identical, the P3 boilers being interchangeable between the two classes, however the J26 engines were only fitted with the saturated (non-superheated) version of the boilers.
Working for most of their lives in the North East withdraws started after nationalisation, though were sometimes paused due to a lack of suitable replacement locomotives, until the arrival of type 2 diesels in the early 1960s allowed the last of the class to be withdrawn in June 1962.