"Quite what the laureate is and is not expected to write about is as mysterious to me as it is to everybody else," he told BBC News Online.

"But there is an additional expectation that they will write about traditional events in the royal calendar.

"It seemed to me that in all kinds of ways this was a significant thing and should be written about."

Princess Margaret's funeral was taking place on Friday

The poem would be seen by the Queen and the Prince of Wales before the funeral, the Independent newspaper reported.

It has also been hailed as the start of a new generation of "realistic" royal verse.

Motion, who is also a professor of creative writing at the University of East Anglia, also wrote a poem in the wake of 11 September.

The Younger SisterBy Andrew Motion

"The luxuries, of course, and privilege -
The money, houses, holidays, the lot:
All these were real, and all these drove a wedge
Between your life and ours. And yet the thought
Of how no privilege on earth can keep
A life from suffering in love and loss -
This means we turn to you and see how deep
The current runs between yourself and us.

And now death spells it out again, and more,
As it becomes your final human act:
A daughter gone before her mother goes;
A younger sister heading on before;
A woman in possession of the fact
That love and duty speak two languages."