David Cameron will be among mourners at Lady Thatcher's funeral later on Wednesday

Prime Minister David Cameron has spoken of his personal debt to Baroness Thatcher, on the day of her funeral, saying she inspired him to become a Conservative in the 1980s.

Mr Cameron said he had formed the view from an early age that his predecessor had been a "force for good" and on the "right side" of the big arguments.

His task was to take her "great inheritance and add to it", he added.

Lady Thatcher was prime minister between 1979 and 1990.

Recalling his earliest memory of the UK's first female prime minister, Mr Cameron spoke of her "brave and resolute" decision to send a task force to retake the Falkland Islands in 1982 - when he was a teenager.

As his family lived close to Greenham Common in Berkshire - a former air-force base where nuclear-armed US planes were stationed in the 1980s - Mr Cameron said he had also been aware of the arguments about nuclear weapons and Britain's defence.

"I remember thinking she was absolutely right," he told BBC Radio 4's Today programme. "We had to be strong, we had to be tough, we had to keep our guard up."

Asked whether he had decided to join the Conservatives specifically because of Lady Thatcher, he acknowledged she had been an influence.

"It was partly because of Margaret Thatcher," he added.

"As I was growing up, the great debate and arguments in Britain - do you keep nuclear weapons or scrap them, do you stand up to the unions or give in the unions, do you have big industries in the private sector or keep them in the public sector?

"I thought she was on the right side of the big arguments. I was interested in politics, cared about politics, cared about what happened to our country, and thought she was a force for good and was making the right calls."

'All Thatcherites'

Mr Cameron, who started working for the Conservatives in 1988 when Lady Thatcher was still in No 10, acknowledged some people did not agree with her politics, but he suggested large parts of her legacy were undisputed.

"In a way, we are all Thatcherites now. One of the things about her legacy, in terms of those big arguments that she had everyone now accepts. No-one wants to go back to trade unions that are undemocratic or one-sided nuclear disarmament or having great private sector businesses in the public sector.

Since becoming Conservative leader in 2005, he said his task had been to build on the work done by Lady Thatcher.

"What we have needed to do is take that great inheritance and add to it. As well as economic renewal, there has been a need for a great social renewal and that side of conservatism needs to have a big boost and that is what I have tried to do over the last seven years."

BBC political editor Nick Robinson said that while some might see Mr Cameron's remarks as evidence the funeral was being used to make a party political statement, he believed the prime minister was making a rather different point.

The prime minister, he believed, was seeking to consign Thatcherism to the past rather than claiming, as he could have done, that he was its inheritor and that today's battles were an extension of hers.

Labour MPs have said they respect Lady Thatcher's achievements while profoundly disagreeing with many of her policies.

Respect MP George Galloway has criticised the "tidal wave of guff" over Lady Thatcher's death, saying comparisons to Sir Winston Churchill, who led the country during World War II, were "absurd".

Mr Cameron and all other members of the current cabinet, as well as colleagues of Lady Thatcher during her 11 years in power, were among 2,300 mourners at the funeral at St Paul's Cathedral. Lady Thatcher was accorded a ceremonial funeral with military honours, one step down from a state funeral.