Fort Fredrick is a fort built by Portuguese colonials at Trincomalee, Eastern Province, Sri Lanka in 1624. It was built on Swami Rock-Konamamalai from the debris of the world famous ancient Hindu Koneswaram Temple (Temple of a Thousand Pillars) that was destroyed by the Portuguese under Phillip IV, colonial occupiers of the Jaffna kingdom and Malabar country on the island. Several Hindu shrines in the Tamil country were destroyed during the occupation, particularly under Phillip III, when Trincomalee became the scene of naval battles during Europe's Thirty Years' War. It was initially a triangular fort named the Fort of Triquillimale by the Portuguese equipped with guns captured from a Danish fleet ship. This fort was captured by a Dutch fleet under Admiral Westerwold in 1639 and in 1665 a new fort was built here by the Dutch to defend against the advancements of the British and the French. The fort was renamed Fort Fredrick.
In 1672, the year when the Dutch Republic was attacked by France, Britain, and two German states, the French captured Trincomalee and later they occupied Batticaloa. However soon the French were forced to leave. Trincomalee was important for its large all-season secure harbor. In late 18th century Trincomalee traded hands once more with the French capturing it again and later handing back to the Dutch East India Company (VOC) at the Peace of Paris in 1784. In 1795 it was taken over by the British, and remained a British garrison till 1948. Duri Coastal artillery guns were added during the two World Wars. Today it remains garrisoned by a detachment of the Gajaba Regiment, Sri Lanka Army, but accessible to visitors.