The NZR K class of 1877 was the first example of American-built locomotives to be used on New Zealand's rail network. Their success coloured locomotive development in New Zealand until the end of steam.
 In 1877, the new Chief Mechanical Engineer of the NZR, Allison D. Smith, required additional motive power for the fledgling Government system. It had been intended to order more J Class locomotives that were of English design. American civil engineer Walton W. Evans had been promoting the advantages of U.S.-built engines to railways of South America and further abroad.  His efforts, having secured an order of two locomotives for Australia's Victorian Railways the previous year, had enticed Smith (see Vogel railways), and an order was placed with the Rogers Locomotive Works of New Jersey, for two tender locomotives with a wheel arrangement of 2-4-2. The initial two Rogers locos were ordered prior to Smith’s appointment as Locomotive Engineer on 10 April 1877 (he had been manager of the Wellington section), and were ordered through Evans. The locomotives were described by R.D. Grant as having the design hallmarks of Roger's Superintendent William H. Hudson, with his truck design innovations and his patented compensated springing throughout from the front bissel truck to the driving wheel springs and to the rear swinging truck.
 Upon their arrival to New Zealand, the locomotives created quite a stir with their bar frames, Gothic-style wooden cabs, locomotive bell, ornate embellishments and, rakish appearances which were at odds with the traditional English locomotive appearance in New Zealand at the time and were described by journalist Charles Rous-Marten as "a watch with all its works outside". One Christchurch paper suggested that they needed a glass case to protect them from the weather. They looked flimsy because of the bar frames  rather than the heavier plate frames of the Js. In addition, this first pair, K 87 "Lincoln" and K 88 "Washington", reputedly wore a kaleidoscope of colours – green, blue, yellow, red, purple, and gold in addition to their Russian Iron boiler jackets. The Baldwin and Rogers locomotives reflected the styling adopted in the 1870s by American builders with elements from the Renaissance Revival and Neo-Baroque architectural styles, and with Islamic Moorish (from Alhambra) influences. Bold colours and painted decorations were used.
 After arrival in the South Island at Lyttelton, the locomotives were quickly put into service.  K 87 "Lincoln" quickly distinguished itself by hauling the first bogie-carriage passenger train, and both the locomotives soon earned a reputation as fast and free runners, with mild coal consumption.  K 88 "Washington" hauled the first train between Christchurch and Dunedin in 1878 on the just-completed Main South Line, assisted by the Double Fairlie "Josephine" south of Oamaru until "Josephine" had to be taken off the train due to mechanical issues - caused by how K 88 was being driven by its driver. Six more of the class was ordered from the Rogers Locomotive Works, numbered from 92 through 97 before K's 87 and 88 had entered service - the former being ordered in January 1878 while the latter entered service in March 1878, such was Allison Smiths faith in the type of engine he had ordered. Allison Smiths faith was well placed with railway authorities regarding the first two K's as "infinitely superior to the English locomotives" in operation during the same period. The second batch of locomotives entered service in the South Island and contained almost no differences to the first two, albeit they were not given names and there is no record of them wearing the same kaleidoscope livery (it is likely K 87 and K 88 had been repainted by this time also). In 1883, due to its design characteristics, the K class was the only class of engine officially permitted to run at 35 miles per hour in ordinary service.
 As more powerful locomotives arrived on the railway system, increasingly of American origin from Baldwin, the K class became relegated from the top expresses and cascaded down to express trains on secondary lines. Two of the K's, K 93 and K 96, were transferred to the North Island during this time. Beginning just after 1900 the class started receiving new NZR-built boilers to replace their Rogers-built wagon-top boiler. The South Island locomotives gained boilers of a Belpaire design, while the North Island pair received round-top boilers. All the new boilers were pressed to 160psi, an increase over the original boiler's 130psi. By this time all the locomotives had received Westinghouse brake equipment also. It was during this time that some of the K class, having been relegated to the Kingston-Gore branch, began earning a reputation for the Kingston-Invercargill express train which earned the name "Kingston Flyer".
 The days of the K class in service were over during the 1920s. Both the North Island examples, plus K 87 "Lincoln" had been withdrawn as early as 1922. The others managed to linger on for a few more years yet, with the last two, K 92 and K 95, not withdrawn until 1927. As was customary at the time, the locomotives were set aside pending disposal, whatever form that may have taken.  All remaining South Island class members lasted long enough to be dumped as embankment protection, something which began in 1926.
 Three of the Rogers K class have so far been exhumed and entered into preservation. The first and most notable of these locomotives is K 88 Washington, which was exhumed from its river grave by the Southland Vintage Car Club on 19 and 20 January 1974. There were a number of loose plans regarding the locomotive's future but these came to nothing. The locomotive wreck was threatened with being pushed back into the river until The Plains Vintage Railway & Historical Museum came up with ambitious plans to restore it back to working order. Beginning in July 1974, they achieved this goal in on the 7 November 1981 proving that the restoration of exhumed locomotives was possible. It was recommissioned on the 25 November the following year. However, on 24 September 1987 the boiler of K 88 (which was the boiler that it had been recovered from the Oreti River with) was condemned, and it was not until 30 March 2002 that K 88 was once again in working order, this time with a new Belpaire-style all-welded boiler and wearing an interpretation of the kaleidoscope colours.
 The other two locomotives exhumed so far are K 94, exhumed by a private owner and moved to The Plains Railway on 21 April 1986. It is in storage in an un-restored state with no active plans for restoration. And K 92, recovered in 1985 by the Fiordland Vintage Machinery Club for their Museum's railway venture on the shores of Lake Te Anau. Partially restored in Te Anau the venture fell through before the locomotive had been fully completed and subsequently the locomotive was put up for sale, with the restoration being completed in Dunedin. Purchased by Colin Smith in 1998, the locomotive's restoration was completed and it is intended to recreate the old "Kingston Flyer" trains of the early 1900s at the Waimea Plains Railway. While waiting for the railway to be completed, K 92 has visited a number of railways in the South Island, with some of the more notable visits being those to the Kingston Flyer, an old haunt for K 92 where it triple headed with the two AB class locomotives resident there, and also a visit to the Plains, home of K 88, where both locomotives were used together extensively.