text: Captain David Seath, 31, was a fire support team commander in 29 Commando Regiment Royal Artillery.
  He suffered a suspected cardiac arrest while running the course and later died in hospital.
  He was laid to rest following a funeral in St Margaret's RC Memorial Church in Dunfermline.
  Hundreds of mourners gathered at the church for the service, which was led by parish priest Father Chris Heenan.
  Capt Seath was originally from Cowdenbeath in Fife.
  Maj Jim McCaffery, 7 (Sphinx) Commando Battery, which is based in Arbroath, told the service:  "It is with great sadness that were are here today to say farewell to Captain David Seath.
  "David was an inspiration to all of us. I genuinely could not have wished for a finer officer.
  "He will be sorely missed and our thoughts and prayers are with his family."
  During the service, Capt James Walker-McClimens read a tribute on behalf of Capt Seath's brother, Gary.
  He told the mourners: "David was my hero and my inspiration. I was so proud to say that he was a Captain in 29 Commando Regiment Royal Artillery and that he served his country with distinction in Afghanistan and the Middle East.
  "Words can't express how proud I was listening to him as he described his tours of Afghanistan and the Middle East.
  "I learnt so much about David's tours of duty, the strong bond of comradeship he had found in the Army as well as the many plans he had for the future.
  "There are no words to express how devastated I am that this story has so tragically ended, with so many chapters left unwritten."
  A family notice published in the Dunfermline Press said the service would be a "celebration of David's life" and urged mourners to wear bright colours.
  Capt Seath fell ill at the 23-mile mark while taking part in the race.
  Following his death, Capt Seath's friends and colleagues vowed to continue to raise money for Help for Heroes and walk the final three miles of the marathon course.
  More than Â£100,000 has been donated to a JustGiving page in his memory while about Â£80,000 has been raised for the charity on his own page.
target: The funeral of an Afghanistan veteran and Green Beret who died after collapsing during the London Marathon has been held in Dunfermline, Fife.