LENNOX Smith is two hours and 40 minutes old.

Weighing in at 6lb 9oz, she is yet to have her first bath and the hospital tags that confirm her existence are still tied round her tiny legs. At 8.32am, she thrust her way into the world on the floor at the foot of the bed, her mother Nicola Stewart supported by a bean bag and - she says - shouting like "a raging bull". It all happened so quickly (just 72 minutes after her arrival at Ayrshire Maternity Unit). Now, however, the birthing room is calm. Stewart is sitting on her bed tired, but happy, and Lennox is being nursed by the midwife who delivered her. As she gives an enormous yawn, Susanne Brown loosens the blankets around her neck. "You are gorgeous, yes, you are," she murmurs.

Brown has delivered hundreds of babies in her 22 years as a midwife, and she has known Stewart for only half a morning, yet the bond between them is obvious. "I still get emotional. I still go home really excited after a good delivery," Brown says. For her part, Stewart feels a debt of gratitude. "I was starting to lose the plot a wee bit, but she kept me calm. When I was moaning for an epidural she said, 'No, you don't need an epidural, you can do this,' and then, the next moment - ta da - Lennox popped out," she says.

A few doors along, David Bowie - a stocky man with gym-honed biceps and tattoos - is cradling his new daughter, her head in his large hands. He looks like a natural, but he says he's never held a baby with no neck control and at first he was scared to pick her up. There's a glow round Bowie, like he's stepped out of a Ready Brek advert, as he gazes at Beau and her mother Chelsey. Bowie gave up one of his two jobs so he could be hands-on with his daughter and has already changed his first nappy. "I knew I'd cry when she was born," he says. "But we were all crying - me, Chelsey, her sister." Was the midwife crying? "No, she was lovely, but very professional. Someone had to keep it together," he laughs.

For as long as there have been midwives - or howdies, as their forebears were known - they have been keeping it together. They are present at women's most intimate moments; they soothe their pain, turn a blind eye to their indignity, share in their joy and - when things go wrong - are there for them in their despair. For this reason they have a solemn, almost sacred, place in the public imagination.

While their basic role - to support women before, during and after delivery - hasn't changed, attitudes have. This is the centenary of the Midwife (Scotland) Act 1915 - a landmark piece of legislation which regulated the profession. A service will be held at St Giles Cathedral in Edinburgh later this year; and it is hoped new panels on the history of midwifery will be added to the Great Tapestry of Scotland, a 143-metre-long art work created by 1,000 volunteer stitchers in 2013.

At the turn of the 20th century, midwifery was an ad hoc affair, dominated by unqualified midwives with varying, and sometimes scanty, levels of expertise; death rates were high and knowledge about babies' nutritional needs almost non-existent.

The Act aimed to bring coherence and medical rigour, but, says midwifery historian Lindsay Reid, it was also something of a land grab, with doctors seizing power. Midwives had to adhere to defer to GPs, even when their own knowledge was superior. After the Second World War, the NHS was set up; fans of Call the Midwife may associate this period with bicycles and home confinements, but the shift to hospitals was already beginning. As drugs and technology advanced, birth became increasingly medicalised until, by the 1980s, maternity hospitals were little more than baby factories, with procedures such as inductions, caesareans and episiotomies carried out as much to make the doctors' lives easier as because women needed them.

Now the pendulum has swung back; midwives have reclaimed the care of mothers-to-be and the aim is to empower women and normalise labour. Today, a low-risk woman might go through her pregnancy without seeing her GP or consultant, and the emphasis is on hypnobirthing not epidurals.

Not all pregnancies are straightforward; there will always be women whose health or circumstances mean they have to give birth in a hospital with a consultant-led obstetrics department. But close monitoring of women's medical histories and experiences means they can be split into green and red pathway patients and receive the appropriate levels of intervention.

Scotland's geography - its dense urban centres and its far-flung tracts of rural land - shapes what kind of care women are given. Those in urban centres are still more likely to give birth in a large hospital, those in more remote communities in midwife-led units or at home.

Ayrshire Maternity near Kilmarnock caters for a large, mixed population. It has 192 full and part-time midwives, all of whom have specific remits (though some rotate): they may be assigned to the labour or in-patient areas, the early pregnancy service, the neo-natal unit or they may be delivering ante and post-natal care in the community. Being part of a large centre has its advantages: the hospital has a range of specialists, such as the midwife who supports women with gestational diabetes, and those who can perform procedures traditionally done by doctors: ventouse and forceps extractions. There is even a midwife who specialises in tokophobia - the fear of giving birth.

In the high dependency unit (HDU), Marie McNairney is tube-feeding baby Amelia Tosh a mix of expressed breast milk and a fortifier through a hole in her incubator. Amelia was 1lb 8oz when she was born at 29 weeks. She is now 34 weeks and five days and has reached 2lb 14.5oz. Still tiny, she is cocooned in a sort of nest designed to mimic the womb.

For a first-time visitor, the HDU can be intimidating. On the walls are monitors which beep when something is wrong - for instance if the babies have "forgotten" to breathe (usually a nudge will start them up again).

The neonatal unit has four consultants and other healthcare specialists, but midwives are

responsible for much of the day-to-day care. They provide reassurance and teach parents about the importance of skin-to-skin contact.

"I was thinking I wouldn't get to touch my wee girl for months and I was very, very upset," says Amelia's mum Gillian. "Then on my first visit to see her, they said: 'Do you want her out for skin-to-skin contact?' I was like, 'Oh, yes, please.'" Amelia has made steady progress, and came off oxygen after her second day.

Given their fragility, it is inevitable that some will not make it, but the unit's "graduation wall" - with its photographs of homecomings, birthdays and first days at school - is testament to its successes.

If the upside of a large hospital is the quality of its specialist care, the downside is a loss of intimacy. Ayrshire Maternity delivered 3,600 babies last year, only 11 of them home births. Though staff try to make everyone's experience as personal as possible, women are unlikely to meet the midwife until they are in labour. This is very different to what happens in smaller midwife-led units where a small team will see low-risk women from their pregnancy test until 10 days after birth.

It's a bright spring day and I am travelling along a country road in Argyll with midwife Karen McAlpine and student Lorna Young, to see Rowan MacLean. MacLean hopes to have her baby in her home overlooking Loch Sween four miles beyond Tayvallich and 25 minutes drive from the maternity unit in Lochgilphead. We turn up a singletrack road towards her property. Outside, hens are running around and MacLean - dressed in black leggings and looking every bit the earth mother - is hanging out washing. Later, as McAlpine and Young take her blood pressure, she tells how her plans to have her other children, Innes, 10, and Calum, nine, at home were scuppered. The first time round, she needed to travel to the Queen Mother's in Glasgow to be induced.

"You go through the doors of one of these big hospitals and it is completely out of your hands," she says. The second time another woman went into labour just before her; with not enough midwives to go round (you need two for a home birth) she was asked to come in to the unit.

Now, she is hoping it will be third time lucky. And it is. Twelve days later, MacLean goes into labour while watching Top Gear. Two midwives - Jan Smith and Donna Bradley - who MacLean already knows, plus Young, arrive just before 11pm and Lachie is born at a quarter past midnight.

The Lochgilphead unit in Mid Argyll Hospital covers 400 square miles from Whitehouse in the south to Cairndow in the north; its six midwives handle around 90 pregnancies a year. Those deemed high-risk are referred to large central belt hospitals. The rest can choose to give birth locally (as around 25 a year do) but they have to understand what that means. There are GPs, paramedics and nurses at Mid Argyll, but no consultants, anaesthetists or operating theatre, so no epidurals or caesareans.

Unable to buzz for help, midwives have to anticipate potential problems. For example, all of them make the journey to MacLean's home during her pregnancy in case (as transpires) they have to find it in the dark. If an emergency situation develops, or a high-risk woman goes into labour early, they will have to make difficult decisions. Sometimes, the women will be transferred by car or ambulance - a 90-minute journey, even if blue-lit - or by helicopter.

Fifty miles further down the Kintyre peninsula, at the midwife-led maternity unit at Campbeltown Hospital, Becky Scott is extolling the virtues of being a midwife in a rural area. Originally from Troon, she worked in Slough but got fed up with what she refers to as baby-catching. "It was awful - everyone was so stressed, doing 14-hour shifts and I thought: 'This is not what midwifery is all about.'"

In Campbeltown, she says, midwives get to know all the women they care for, often delivering more than one baby in the same family. One - Elspeth Colville - is on to her second generation, having delivered the baby of one of her babies. "I was in Slough for eight months and I didn't know anyone," says Scott. "I was here for eight minutes and I knew everyone."

So strongly do many women feel about their midwives they become proprietorial. "You''ll meet them with in the street and they'll introduce you, saying: 'This is MY midwife,'" adds her colleague Isabel Cook.

There are fewer home births at Campbeltown than at Lochgilphead, but it is more remote and takes in the island of Gigha, so many of the same pressures apply. Helen Fairbairn is the midwife for Gigha. When she visits a woman, she has to take the ferry over from Tayinloan, then rely on relatives transporting her to the house. Because the ferry doesn't run after 7pm, most women agree to come off the island at night from a week or so before their due date, but Fairbairn is currently looking after a woman who is afraid to leave because she is embroiled in a dispute over her right to remain in her caravan. This is the woman's first pregnancy, she has health complications and her safety is preying on Fairbairn's mind.

Given Campbeltown is three hours by road from Glasgow, transfer by air ambulance or helicopter is not uncommon. Scott hates flying. "I warn the girls they won't get much talk out me," she says. "I will give them a quick 'are you all right?' and if they nod, that's fine and I'll look out of the window and think: 'Please, let this be over.'"

On the way to an ante-natal visit in Carradale, Fairbairn tells me the story of the most dramatic flight she has been on. It started with a concealed pregnancy. A woman came into A&E with stomach pains and the doctor realised she was about to give birth. With her contractions intensifying, she and the midwife boarded the air ambulance. It was on the runway, ready for take-off, when Fairbairn noticed one of the dials appeared to be faulty and the pilots were consulting their manuals. They talked to air traffic control at Glasgow who told them it was "a clear run all the way down" so they taped cardboard over the dial and flew the journey without instruments at around 200ft. "We could see every car, every cottage and it felt like we were skirting the surface of the water," Fairbairn says. They had to fly round and round Dumbarton Rock to gain enough altitude to get over the skyscrapers and into Glasgow Airport. When they came to land, Fairbairn could see all the jumbo jets had been grounded to allow them safe passage.

Though pregnancy is less hazardous than it was 100 years ago, tragedies such as miscarriages and stillbirths still occur. But, where once these losses were barely marked - the babies' bodies discreetly disposed of and parents left to pick up the pieces alone - midwives are now aware of the need to mourn: to hold the baby, where possible, make a memory box and have a funeral.

Back at Ayrshire Maternity, Elaine Pirrie understands this more than most; when she was six, her mother lost a baby after giving birth at home. She remembers the screaming, and the white crib at the end of the bed. For years, her mother was left with nothing. Then, when Pirrie started her training, she realised it was possible to find out where her brother was buried. He was in a communal plot, but there were statues and they were allowed to put his name up. "That helped my mum a lot," she says.

Today, Pirrie is the hospital's foetal service and early pregnancy manager. This means she

spends most of her days comforting people: when a test shows a raised risk of Down's syndrome, when a scan reveals a foetal abnormality, when a woman comes in bleeding and it turns out she has miscarried, it's Pirrie who breaks the news, and helps them deal with the physical and emotional fall-out. "I have been doing this job seven years and it's fabulous - and do you know why? Because it means these couples, who are having a hellish time, have one point of contact. They know they can lift the phone at any hour and ask me any question - if it helps them sleep at night then I'm fine with that."

Last year, Pirrie encountered an amazing woman; having discovered her baby had anencephaly - a condition in which a major part of the brain and skull are missing - she decided to continue with the pregnancy, though she knew her baby wouldn't live for more than a few days after birth. Then, she asked if her baby's organs could be donated. "In the end, her baby's condition deteriorated too quickly for that to happen, but I learned so much from her," says Pirrie, who was invited to the funeral. The baby has a beautiful memorial stone, she says. And her mother is now 29 weeks pregnant with twins.

Whether in the city or in the country, in large hospitals or tiny units, midwives all talk of the privilege of bringing babies safely out into the unknown. "There's not many people can say they're changing someone's life," says Becky Scott. "It's the best job in the world."