Loksa is a town and municipality in Harju County, northern Estonia. It has a population of 3,403 (as of 1 January 2010) and covers an area of 3.81 km².
The Valgejõgi river runs through Loksa and drains there into Hara Bay.
The village of Loksa was first mentioned in 1687 but this area is known in modern times as the village of Kotka.
The development of what is known these days as the town of Loksa started around 1874 when the landlords of Kolga established a new brickyard outside Loksa village. Around this factory a new market town was born.
In 1903, a shipyard was established, boosting the community's further growth. From Loksa, bricks were transported to Reval (now Tallinn), Helsingfors (now Helsinki) and Saint Petersburg. Although no ships were built in Loksa, the shipyard was heavily engaged in repairing ships from 1905 onwards.
By the end of the 19th century, there were 36 dwellings in Loksa. By 1934, their number had grown to 150. Loksa soon became the administrative centre of Loksa Parish which was part of Harju County until 1949 and of Viru County from 1949 to 1950.
From 1950 to 1957, Loksa was the administrative centre of Loksa District. After a new administrative reform in 1957 Loksa became part of Harju District.
The brickyard was closed down in 1981, but the shipyard continued to be expanded until the end of the Soviet occupation and remains the town's main employer.
With the restoration of the Republic of Estonia in 1991, Loksa became again a centre of the restored Loksa Parish and was elevated from market town to town on August 25, 1993.
Since the beginning of the 1990s, the population of Loksa has decreased by more than one fifth. This has been mainly caused by growing unemployment, resulting from closure and downsizing of several companies not fit for new economic climate.
In 2000, there were 1,650 inhabitants in labor force, 750 of whom were working somewhere else.
The main ethnic group in Loksa is Russians, making up about 57% of the whole population. Estonians make up less than one third of all inhabitants.
The history of education in Loksa dates back to December 1867 when teacher Jakob Janter started to teach 20 children in a local farm house. The first schoolhouse was built in 1903, but this building burned down in 1927. Restoration work took two years and was completed in 1929.
With the influx of Russian workers in the late 1940s, three classes for Russian-speaking children were created in 1948. Loksa primary school was upgraded to secondary school in 1952 and renamed Loksa 1. Secondary School, the name it bears also today. Until 1988, both Russian and Estonian children studied in the same school.
In the end of the 1980s, both Russian- and Estonian-speaking community had grown big enough to justify creation of a second school. Loksa 2. Secondary School for Russian-speaking children was established in 1988 and is still operational, since 1996 under the name of Loksa Russian Gymnasium.