Unlocking iPhone that was on contract?

One of my friends is selling me his old iPhone 3GS. He was on a bill pay contract with 3 and I want to know is it possible for me to unlock this phone to meteor pay as you go?

Added (1). Also I'm irish, so not AT&T

You can only unlock it by jailbreaking- I would not purchase the phone as jailbreaking in itself is risky and it is not officially unlocked- if you restore it or sync it with iTunes it will lock again and you won't be able to use it.

You can definitely unlock an iPhone 3GS safer and easier using remote unlocking service. This method of unlocking is safe, simple, affordable and quick. This method of unlocking also doesn't require a jailbreak too. You can get the remote unlocking service for an iPhone 3GS from http://www.simpleunlocking.com/apple-iphone-3gs/rs16wp9/ at low cost. You can also visit http://www.mobileunlockguide.com/apple-iphone-3gs This site provides free unlocking instruction guide. This would help you understand unlocking process better.

Yes you can get iPhones unlocked, most places will do it for you but for a price

Is it AT&T? If so, yes. You can unlock it with just your IMEI, a new SIM and iTunes… With some help from these guys: http://gsmunlocklabs.com/unlock-iphone/

it's a permanent unlock that doesn't require jailbreaking or any sim card attachments.

You may be able to get it done legitimately through 3 now that the contract is ended.
get your friend (the original contract holder) to ask them