The bowler hat was devised in 1849 by the London hatmakers Thomas and William Bowler to fulfil an order placed by the firm of hatters Lock & Co. of St James's. Lock & Co. had been commissioned by a customer to design a close-fitting, low-crowned hat to protect his gamekeepers' heads from low-hanging branches while on horseback. The keepers had previously worn top hats, which were easily knocked off and damaged. Lock & Co. then commissioned the Bowler brothers to solve the problem. While most accounts state that the customer was William Coke, a nephew of the 1st Earl of Leicester, recent research has cast some doubt on this, and it is now believed that it was instead Edward Coke, the younger brother of the 2nd Earl of Leicester.
When Coke arrived in London on 17 December 1849 to collect his hat he reportedly placed it on the floor and stamped hard on it twice to test its strength; the hat withstood this test and Coke paid 12 shillings for it. In accordance with Lock & Company's usual practice, the hat was called the "Coke" hat (pronounced “cook”) after the customer who had ordered it. This is most likely why the hat became known as the "Billy Coke" or "Billycock" hat in Norfolk.