Barry Railway Class K were 0-6-2T steam tank engines of the Barry Railway in South Wales. They were designed by J. H. Hosgood and built by an American company, Cooke Locomotive and Machine Works of Paterson, New Jersey. At the time the Barry wanted to order these locomotives, British manufacturers already had a full order book. In order not to face an indefinite wait, invitations to tender were advertised in the United States. Hosgood's aim was to have a tank engine equivalent to the “Class B1”. However, because of his desire for a speedy delivery, he agreed to certain compromises in the design. The order was placed in April 1899 and was delivered later that year. Like the 0-8-2 tank locomotives Cooke built for the Port Talbot Railway and Docks Company around the same time, the engines had the clean lines and uncluttered appearance of British practice, but had bar frames, the front buffer beam separate from the footplate, as well as cylinder and saddle designs typical of American practice.