Can i buy an at&t iphone and then use it with o2

I'm already with o2, and i wanted to go with an iphone 3g S 32gb.

Here, o2 is selling it for ?538,
and in america its only $299.

I know someone who can buy me and at&t iphone,
but will it work with my o2 sim card,
or would i have to get it unlocked.
and how would i do that?
i was going to go Pay & Go aswell.
It will only work after jailbreak. Right now there is no jailbreak for the 3GS, but it probably won't be long. The $299 is only with a 2 year contract.
Actually you will have to do more than jailbreak, you will have to unlock as well. Check out the forum all about jailbreak and you should find out some great info. I know people have O2 with the iPhone from ATT.

Original thread: https://forums.imore.com/threads/can-i-buy-an-at-t-iphone-and-then-use-it-with-o2.173214/