Foreign Office Minister Mike O'Brien says the ball is in Saddam Hussein's court but allowing weapons inspections would make a difference.
Mr O'Brien made the comments as he became the first British minister to visit Libya since 1983.
The minister is meeting Libyan leader Colonel Gaddafi to try to persuade him to back the international war against terrorism.
Different directions
Libya has in the past been seen as a sponsor of terror groups but Mr O'Brien said it now realised its best interests lay in keeping to international rules.
In contrast, Iraq was moving in the opposite direction, he told BBC Radio 4's Today programme.
The prospect of attack on Iraq was expected to be on the agenda for Wednesday's talks in Tripoli.
Mr O'Brien said: "Nobody wants war for the sake of it. We understand there are issues in relation to Iraq. In particular, we need to make sure the inspectors go in.
"The ball is no in Saddam Hussein's court. He must ensure that the inspectors go into Iraq and that international is complied with.
"If international law is complied with, of course the position will then be very different."
Regime change
Mr O'Brien said he knew nobody in the UK who wanted Saddam Hussein to stay in power, but getting access for weapons inspectors was the clear objective.
That stands in contrast with US policy, which has "regime change" as its ultimate goal.
US arms control minister John Bolton has said: "That policy will not be altered whether the inspectors go in or not."
Mr O'Brien's words will be seen as evidence that the UK is taking a different stance to Washington, despite the close links between Tony Blair and President George Bush.
UK's 'peace role'
Iraq's representative in London has urged the UK to act as a brake on what is seen as America's more hawkish line.
Mudhafar Amin told Today: "We think Britain could play a very positive crucial role in convincing the Americans ... to finding a peaceful means to solving the problem."
United Nations Secretary General, Kofi Annan says Iraq must accept the Security Council's terms on disarmament and weapons inspections before a UN official can take up an Iraqi invitation to visit.
Mr O'Brien said the difference was that Libya was moving towards complying with international laws while Iraq was going in the opposite direction.
Libya talks
Former military chiefs and ex-Conservative Foreign Secretary Douglas Hurd have voiced their unease about possible action against Iraq.
The disquiet of several Labour MPs on the problem is clear and religious leaders said on Tuesday that war against Iraq would be illegal and immoral.
Mr O'Brien hoped to use his milestone meeting with Colonel Gaddafi to ask for intelligence information about the al-Qaeda terror group.
"A Libya which no longer supports terrorism is very much in Britain's interest," he said.
"Our hard-headed judgement all along is that we are more likely to achieve that by encouraging rather than isolating Libya."
Also on the agenda was compensation from Libya for the Lockerbie bombing and the investigation into the 1984 murder of Wpc Yvonne Fletcher outside the Libyan embassy in London.
Possible economic ties were also thought likely topics for discussion amid the diplomatic thaw, while Colonel Gaddafi wants sanctions, already suspended, to be permanently lifted.