David Cameron, Alex Salmond and the Princess Royal have joined thousands of visitors at the sixth annual Armed Forces Day.
Entertainment took the form of a parachute display and displays by Typhoon and Tornado jets, with Stirling Castle providing the backdrop.
Armed Forces Day was established in 2009 to honour the country's servicemen and women and their families across the Army, Navy and RAF.
This year's event saw tanks and military vehicles on display and demonstrations by Sea King, Apache and Puma helicopters. Plane enthusiasts also got the chance to see the Lancaster, Spitfire and Hurricane in flight.
The estimated cost of hosting the event is about £524,000, but organisers suggest it will earn about £1 million for the local economy as well as boost Stirling's profile as a tourist destination.
Both Prime Minister David Cameron and First Minister Alex Salmond attended along with other senior politicians from Westminster and Holyrood, and the Princess Royal.
The annual celebration was held in Scotland for the second time, on the same weekend Stirling marks the 700th anniversary of the Battle of Bannockburn.
The two-day Bannockburn Live event features a re-enactment of the legendary clash which saw Robert the Bruce defeat the English army led by Edward II in 1314.
Despite the events being held so close to one another the potential for them to be used by independence and unionist supporters as the countdown to September's referendum continues has been dismissed.
Speaking at Armed Forces Day in Stirling, The Princess Royal said: "This event celebrates and expresses appreciation for the outstanding contribution the armed forces make to the country, and recognises the serving personnel, reservists, cadets and veterans from all three services, and their families."
Mr Cameron said: "Stirling put on a very good offer to host Armed Forces Day and I think Stirling has put on an absolutely brilliant show.
"The crowds are much bigger than expected.
"I think a lot of people want to show their respect for the armed forces, what they do, the values they bring to the country and also to say thank you to their families.
"But there is a bigger message I think, perhaps, this year because we can consider what Scotland brings to the UK armed forces and what being part of a bigger entity brings for Scotland as well.
"My message is always that Scotland gets the best of both worlds, and that's what we want to see.
"More power through the Scottish Parliament to make its own decisions, but also the benefit of being part of a larger United Kingdom with - one advantage - these armed forces which can help protect our values and keep us safe.
"Scotland has a very proud history. All our nations in the UK have proud histories.
"But what we decided to do was to come together as a family of nations, and I think we all benefit from being part of that family.
"So yes, of course, we should commemorate and celebrate Bannockburn, but we should also commemorate and celebrate every year what our armed forces do."
Scottish First Minister Alex Salmond said: "It's fantastic that so many people came out to recognise those who serve.
"It's a fantastic occasion, and great for Stirling with Armed Forces Day and Bannockburn Live in the same weekend. The city of Stirling is the epicentre of events.
"Bannockburn was there first, and it's the 700th anniversary but I don't think that mattered.
"We were happy to support both events. I don't see a conflict at all, and if anyone tried to produce one I think they have been sorely disappointed."
He said an independent Scottish defence force would "make a significant contribution" to Nato and international peacekeeping missions.
"We have no pretensions to be a world power," he said.
"We are not going to participate in illegal invasions of Iraq, or things like that, but we will be making a valuable contribution with our friends and allies.
"Of course it's important to remember that it will be Her Majesty's Armed Forces in Scotland.
"David Cameron is not head of the Army, and Alex Salmond is not head of the Army, Her Majesty the Queen is head of our armed forces and will continue to be in an independent Scotland."
Scottish Secretary Alistair Carmichael said: "This is an occasion when the whole community can come together, see what the modern armed forces are all about and where they can also demonstrate the respect I know there is out there for the courage, professionalism and dedication of our armed forces.
"As part of the UK the Scottish regiments are completely integrated in one of the biggest, most well respected, most professional and focused fighting forces in the world."
He said armed forces both in Scotland and the remainder of the UK would be "incredibly diminished" if Scotland votes for independence.
"You wouldn't ever recreate something that was as good as what we have," he said.
"It's another reason why people will want to think very carefully before they cast their vote on September 18."
Mr Carmichael said Bannockburn is "a big part of my history as a federalist and a proud Scot".
"What happened at Bannockburn 700 years ago was something that I learned as a schoolboy growing up in Islay, but it is part of our history.
"In order to understand what we are today and where we are going to be in the future, you have to understand the past.
"But beyond the history I don't think there is any real political message to be drawn from it.
"You won't really find much argument between people like Alex Salmond and myself about the courage, professionalism, determination and focus of our armed forces and that is really what today is about."
Air Chief Marshal Sir Stuart Peach, vice chief of the defence staff, said: "This is an opportunity for the armed forces to show themselves to the public in a yearly event, this time in Stirling in Scotland.
"And it's a very special opportunity for us to unite with the society that we serve.
"We have had nothing but a warm welcome from everybody from the provost down in the city of Stirling.
"We could not have been made more welcome."
This is the final Armed Forces Day before British forces pull out Afghanistan, but Sir Stuart said they will remain busy around the world.
He said: "We, of course, are still serving in Afghanistan. It is our main effort and we have to remember that as we continue to support and mentor and train with the Afghan security forces.
"And of course we have other elements in the armed forces serving from the Royal Navy, Royal Marines and the Royal Air Force.
"The Royal Navy is also busy in the Caribbean, in the Indian Ocean with counter-narcotics and counter-piracy.
"The Royal Air Force is undertaking policing in the Baltic in support of Nato, and we have the Army at readiness around the world.
"So the armed forces are busy, but of course this year does mark that point as we reset for contingency and we absolutely get ready for what happens next."
Poppyscotland chief executive Ian McGregor said: "Poppyscotland, together with our parent charity The Royal British Legion, are delighted to support the Armed Forces Day National Event in 2014.
"As Stirling is the host city, the event gives us an excellent opportunity to highlight both the wide range of vital support provided by Poppyscotland to those in the Armed Forces community living north of the border, and the complementary services of The Royal British Legion throughout the rest of the UK."
Those wanting to mark the occasion today can adopt a "Twibbon" which will add an image of the Armed Forces on their Twitter or Facebook profile.
Meanwhile than 300 ''warriors'' performed on the Bannockburn battlefield in scenes choreographed by the team behind the battle sequences in hit films Gladiator and Robin Hood, and visitors had the chance to trace their ancestral roots and experience life as it was lived in the 14th century.
The festivities began last night with Pipefest, when pipe bands, Scottish clans and highland dancers joined a parade from the gates of Stirling Castle through the city.
Launching the programme for Bannockburn Live last month, Scotland's Tourism Minister Fergus Ewing said "it will be a weekend where we put politics aside".
VisitScotland chairman Mike Cantlay said: "The teams for Pipefest, Armed Forces Day and Bannockburn Live are working hard to ensure Stirling's Big Weekend is one to remember.
"Never before has this stunning city hosted as many tourists from all over the world and it really is Stirling's time to shine, showcasing the attractions, landscapes and history of this amazing area."
The National Trust for Scotland and Historic Scotland have been working for months to transform the Bannockburn site ahead of the 700th anniversary celebrations.
Historic monuments have been restored and a new visitor centre has welcomed thousands of visitors since opening earlier this year.
Stirling Council leader Johanna Boyd said: "It's been an absolutely fantastic weekend for Stirling, a really superb success."