The Duke of Edinburgh, arguably the world's most famous husband, has died at the age of 99.
He spent seven decades in the shadow of his wife, the UK's Queen Elizabeth II - but his force of personality meant he would never be simply a professional spouse.
So who was the man beside the monarch, and how did he come to marry the Queen?
A husband but never a king
First things first: The Duke, also known as Prince Philip, was never in line for the throne - which his eldest son stands to inherit - and never held the title of king.
That's because in the UK, a woman who marries the monarch can use the ceremonial title of queen - but men who marry the monarch can't use the title king, which can only be used by male sovereigns.
The Queen and Prince Philip had four children together: Prince Charles, 72, Princess Anne, 70, Prince Andrew, 61, and 57-year-old Prince Edward.
As they tell it, Philip often exerted his will when they were young.
Royal biographer Ingrid Seward quotes Prince Andrew as saying of his childhood: "Compassion comes from the Queen. And the duty and discipline comes from him."
But Andrew also remembered how his father made time to invent bedtime tales, or listen to his children read Rudyard Kipling's Just So Stories.
Prince Philip lived long enough to see his eight grandchildren grow up, and to welcome 10 great-grandchildren.
Where did he start out in life?
Curiously, Philip's journey to Buckingham Palace began back in 1922, in a crib made from an orange box.
He was born on 10 June 1921 on the Greek island of Corfu, the youngest child and only son of Prince Andrew of Greece and Princess Alice of Battenberg.
That heritage made him a prince of Greece and Denmark, but the following year the family was banished from Greece after a coup.
A British warship carried them to safety in Italy, with baby Philip dozing in a makeshift fruit crate cot.
What was his upbringing like?
Philip's childhood was fragmented, and darkened by a series of losses.
In 1930, when he was eight years old, his mother was committed to a secure psychiatric centre after suffering a nervous breakdown.
Philip saw little of either parent in the years that followed. His father retreated to the French Riviera with a mistress, and his mother's relatives in the UK helped raise him. He would later adopt their surname, Mountbatten - an anglicised form of the family name Battenberg.
A Scottish boarding school, Gordonstoun, passed for home during his teens. Its founder and headmaster was Jewish educational pioneer Kurt Hahn, who had been forced out of Germany for condemning the Nazis.
The school gave Philip structure, and nurtured his self-reliance. Its somewhat Spartan regime saw pupils rise early for a freezing shower and cross-country running, which Hahn believed would combat the "poisonous passions" of adolescence.
In 1937, one of Philip's four sisters, Cecilie, died in an air crash along with her German husband, mother-in-law, and two young sons. She was heavily pregnant at the time.
Cecilie had recently joined the Nazi party, which had near-totalitarian control of Germany. Grieving Philip, aged 16, walked through the streets of Darmstadt behind his sister's coffin, past crowds giving "Heil Hitler" salutes.
"It's simply what happened," Prince Philip later said of that time. "The family broke up. My mother was ill, my sisters were married, my father was in the south of France. I just had to get on with it. You do. One does."
How did Philip court the Queen?
When Philip left school, Britain was on the verge of war with Germany. He joined the Britannia Royal Naval College in Dartmouth (the UK's naval academy), where he proved a brilliant cadet and graduated top of his class.
When King George VI paid an official visit in July 1939, Philip was charged with entertaining his young daughters, Princesses Elizabeth and Margaret.
Their governess, Marion Crawford (employed as a guardian for the princesses), recalled later that Philip had "showed off a great deal". He made quite an impression on the 13-year-old Elizabeth, as would soon become clear.
Prince Philip served with distinction in World War Two, seeing military action for the first time in the Indian Ocean. By October 1942, he was 21 years old - and one of the Royal Navy's youngest first lieutenants.
The teenaged princess and the officer kept in touch by letter. Over Christmas 1943, after Philip had been to stay with the Royal Family, a photograph of him in naval uniform appeared on her dressing room table. It was a decisive gesture from a reserved but determined young woman.
Some aides were sceptical. A famous sneer (since attributed to more than one official) claimed the prince was "rough, ill-mannered, uneducated and would probably not be faithful".
But naysayers could do nothing to deter the future Queen.
According to biographer Philip Eade, Philip's letters from 1946 reveal an ardent young man with a new sense of purpose.
He wrote to his soon-to-be mother-in-law: "I am sure I do not deserve all the good things that have happened to me. To have been spared in the war and seen victory, to have been given the chance to rest and to re-adjust myself, to have fallen in love completely and unreservedly, makes all one's personal and even the world's troubles seem small and petty."
King George gave Philip permission to marry his daughter. But first there were some tweaks to make.
The erstwhile Prince of Greece and Denmark became a naturalised British subject, formally joined the Church of England and abandoned his foreign titles.
On his wedding day, 20 November 1947, he was made Duke of Edinburgh, a name he was widely known by for the rest of his life. He was 26, and his new wife 21.
The royal couple would have just over four years (and two children) together before duty came knocking.
The fateful news reached them at a game lodge in Kenya, during their 1952 tour of the Commonwealth. King George VI, Elizabeth's father, was dead at 56.
Commander Michael Parker, the Duke of Edinburgh's friend and private secretary, described the moment he realised his wife was now Queen.
"He looked as if you'd dropped half the world on him. I have never felt so sorry for anyone in all my life. He just breathed heavily, in and out, as though he were in shock. He saw immediately that the idyll of their life together had come to an end."
Philip's naval ambitions were curbed. The new Queen Elizabeth would need her husband by her side.
The Duke of Edinburgh was named as the Queen's consort. His primary function was to support his wife.
A long-running row broke out in the early 1950s when Philip wanted the Royal Family to take his surname, Mountbatten.
"I am the only man in the country not allowed to give his name to his children!" he fumed when the Queen was persuaded to keep Windsor. "I'm nothing but a bloody amoeba!"
Philip struggled to find purpose in the limited role set out for him. But as a natural pragmatist, he was determined to blow fresh air through the stuffier corridors of Buckingham Palace.
How did Philip change the monarchy?
The Duke never forgot his family's forced exodus from Greece, and believed monarchies must adapt to survive.
He set up informal lunches where the Queen could meet people from a broader range of backgrounds. The footmen - palace servants with a traditional uniform - stopped powdering their hair. And when he learned the palace was running a second kitchen exclusively to feed the royals, he had one shut down.
Some changes were more personal, and reflected his childlike love of gadgets. Before the Coronation, when Philip and the future Queen moved into Clarence House in 1949, he happily installed an array of labour-saving devices, including one in his wardrobe that would eject a suit at the push of a button.
The Duke also championed a 90-minute fly-on-the-wall BBC documentary entitled Royal Family, which aired in 1969 and was considered landmark television.
It featured the Queen feeding carrots to her Trooping the Colour horse, watching TV and discussing salad at a Balmoral barbecue while Princess Anne cooked sausages.
At Buckingham Palace, Philip had intercoms put in so that servants no longer had to ferry written messages to his wife. He carried his own luggage, and cooked his own breakfast in his rooms with an electric frying pan - until the Queen objected to the smell.
How did he spend his time?
As the longest-serving consort in British history, the prince took on some 22,191 solo engagements. When he retired from royal duties in 2017, he was said to be patron, president or a member of more than 780 organisations.
Accompanying the globetrotting Queen on Commonwealth tours and state visits, he visited 143 countries in an official capacity, making use of his fluent French and German.
The countries included Vanuatu, a South Pacific island nation, where he is revered by one rainforest community as the reincarnation of an ancient warrior.
But one of his most enduring legacies is the Duke of Edinburgh's Award, founded in 1956 at the urging of his former headmaster, Kurt Hahn.
Participants aged 14-25 can gain awards by doing volunteer work, learning physical activities and skills, and undertaking an expedition like a mountain trek or a sailing trip. In 2016, almost 1.3 million young people were taking part in the scheme in more than 130 countries and territories worldwide.
"If you can get young people to succeed in any area of activity," its founder told the BBC, "that sensation of success will spread over into a lot of others."
In his spare time, Philip was a talented sportsman. He learned to sail at Gordonstoun, and became a regular competitor in the regatta at Cowes, on the Isle of Wight, where sailing races are held each summer.
He loved equine sports, including carriage driving, and was among the UK's top four polo players in the mid-1960s.
He was also a committed environmental campaigner and wildlife advocate, becoming president of the World Wildlife Fund (UK) in 1961 - though he faced criticism when a picture emerged of him on a tiger shoot with the Queen in India the same year.
In his own words, and the Queen's...
Asked to sum up his contribution to British life, Prince Philip responded with typical frankness: "I've just done what I think is my best. Some people think it's all right. Some don't. What can you do? I can't change my way of doing things. It's part of my style. It's just too bad, they'll have to lump it."
The prince drew repeated controversy by making outspoken or racially insensitive comments, including in 1986 when he told a group of British students in China: "If you stay here much longer you'll all be slitty-eyed."
Critics deemed him gaffe-prone and out of touch. His defenders saw the prince as a product of his times who was trying to share a joke.
Insiders said laughter was the glue that kept the forthright Prince Philip and the Queen together. He himself suggested it was her tolerance.
The Queen's once-favoured speech-opener, "my husband and I...", was mocked in the 1960s and afterwards by satirists who called it archaic and stilted. She retired the phrasing, but the sentiment remained.
Her Majesty, now simply "I", summed up Prince Philip in a heartfelt speech for their Golden Wedding anniversary.
"All too often, I fear, Prince Philip has had to listen to me speaking. Frequently we have discussed my intended speech beforehand and, as you will imagine, his views have been expressed in a forthright manner.
"He is someone who doesn't take easily to compliments but he has, quite simply, been my strength and stay all these years, and I, and his whole family, and this and many other countries, owe him a debt greater than he would ever claim, or we shall ever know."
BBC