The Barry Railway class H was a small class of seven 0-8-2T tank locomotives built for the Barry Railway by Sharp Stewart in 1896. When they were introduced they were the first locomotives in Britain to use the 0-8-2 wheel arrangement.
When the Barry Railway had need of some powerful locomotives to power coal trains on the Vale of Glamorgan Line it turned to Sharp Stewart, who had supplied most of the locos on the railway, for a suitable engine. The result was the Class H 0-8-2T, which had small driving wheels to give a high tractive effort, and were heavy (for the time) giving good braking. Seven locomotives were delivered in 1896, and numbered 79–85, the numbers being carried on an oval plate attached to the side tanks. Once delivered however, the Class H locos were employed in hauling heavy coal trains between Barry Docks and the large yard at Cadoxton, and in this way they spent their working lives.
With the grouping in 1922, the Barry Railway became part of the Great Western Railway which renumbered the locos 1380–1386, placing the new numbers on the bunker behind the cab door, and designating them 1380 class in the GWR records. Improvements were made to numbers 1380 and 1383 at Swindon Works including GW pattern safety bonnets, enlarged bunkers, new buffers and an extended smokebox, the changes adding an extra ton to the loco weight. At the same time the boiler pressure on these two locos was raised by 10 psi (69 kPa) with the tractive effort also being increased appropriately. Despite this the locos were non-standard in GWR terms, and were all scrapped between 1925 and 1930.