Dotted Loosestrife

Dotted Loosestrife

Observation - Dotted Loosestrife - UK and Ireland. Description: Cannot identify this one, wondering if it is a garden escapee?. We have it in the boggy ground by the lochan, and we have seen it locally on burn edges. it stands about 3 ft on a square stem. at intervals up the stem it has four spear shaped leaves on v

Cannot identify this one, wondering if it is a garden escapee?. We have it in the boggy ground by the lochan, and we have seen it locally on burn edges.
it stands about 3 ft on a square stem. at intervals up the stem it has four spear shaped leaves on very short storks and about 10 separate flower heads. Each flower has 5 equal petals.
Any ideas?