Maesteg lies at the northernmost end of the Llynfi Valley, close to the border with Neath Port Talbot.
The nearest settlement was the village of Llangynwyd, located on the hillside about two miles (three kilometres) south of the present-day town centre of Maesteg.
Close to Llangynwyd is an extensive earthwork known as Y Bwlwarcau ("the bulwarks"), an Iron Age enclosure that is probably a remnant of the earliest settlement in the Llynfi district.
During the Middle Ages, the valley was part of Tir Iarll (the Earl's Land), an area "famous for its game coverts, its woods and sparkling streams" that was set aside as a hunting reserve by Robert Fitzhamon, Earl of Gloucester, the Norman conqueror of Glamorgan.
[10] The origins of the present-day community in the Llynfi Valley date from the late 1820s, when the area's considerable coal and iron ore resources were developed on an industrial scale for the first time.
[11] The railway opened up the district and led to the formation of an iron company, which began building a works on Maesteg Uchaf Farm, near the site of the present-day town centre, in 1826.
The company took its name from the farm, and by 1831 two blast furnaces were in operation and the first rows of workers' housing had been completed near the Maesteg Ironworks.
[12] In 1839, work on a second, larger, ironworks commenced at Nantycrynwydd Farm on a site now largely occupied by the Tesco store and car park.
The Cornstores section of the Maesteg Sports Centre and the adjoining base of a blast furnace remain as links to the Llynfi Works and the valley's significant 19th century iron industry.
The Cambrian/Llynfi Works attracted investment capital from a number of prominent figures of the early Victorian period, including the poet William Wordsworth, who was a Cambrian shareholder in the early 1840s, the gin distiller Sir Felix Booth, and the writer and radical politician Dr John Bowring.
After his Llynfi venture, John Bowring became British Consul in Canton, China, and was Governor of Hong Kong from 1854 to 1859.
During the mid-1880s, with the closure of the Llynfi Works and its associated collieries, the Maesteg district, with a population of about 10,000, faced an uncertain future.
In 1900, another company, led by Sir Alfred Jones of the Elder Dempster shipping line, also developed collieries in the valley.
In 1908, the Cunard liner Mauretania was entirely fired by Llynfi coal when the ship established a new record for crossing the Atlantic.
[15] During that period of acute poverty and large-scale unemployment, the population of the Llynfi Valley decreased by almost a third as many left the district to seek employment in the new light industries growing up in areas such as West London and the English Midlands.
Due to the buoyant coal industry and the success of the new factories during the years 1950–75, the population of Maesteg and district stabilised at about 20,000, roughly the figure today.
With the creation of more jobs in the Bridgend and Port Talbot districts, the Llynfi Valley gradually became a residential area, a process which speeded up with the terminal decline of the coal industry during the period 1977 to 1985.
[19] Primary and secondary education is available through the medium of Welsh, there are Welsh-language chapels, and the headquarters of Menter yr Iaith Pen-y-bont ar Ogwr is based in the town.
Maesteg has six English language state primary schools: Cwmfelin, Plasnewydd, Caerau, Nantyffyllon, Llangynwyd and Garth.
The pupils of St. Mary's and St. Patrick's pursue their secondary education in Archbishop McGrath Catholic Comprehensive School, located in Brackla, a few miles to the south.
Regarding competitions and awards, Maesteg Gleemen is the most successful MVC in the Llynfi Valley and Bridgend County Borough Council area.
Maesteg Children's Choir hosts many concerts throughout the year, and Curtain Up Youth Theatre has been performing musicals since the turn of the millennium.
The town is also served by three local newspapers: The Glamorgan Gazette, published weekly, has its main office in Bridgend, but prints news related to Maesteg; The Gem, formerly The Recorder, a free weekly, printed in Cowbridge, and The Llynfi News, a free monthly paper, based in Maesteg.