The photographer noticed the fleeting expression since she was his aunt. She was able to capture it because, as a pioneer in the infancy of the camera, she was using an unusual fast exposure method.

Her nephew was William Mansel Llewelyn, a child in a family of Swansea chemists and industrialists. The photographer was Mary Dillwyn. Her image of Willy was revealed yesterday in an album that the National Library of Wales announced it had saved for the nation because of its importance in the history of the art.

The library bought the album for £48,000 from a private owner, after the government refused to grant it an export licence.

Mary Dillwyn's photographs were taken in the 1840s and early 1850s in a period of hectic experimentation barely a decade after the race between Louis Daguerre in France and William Fox Talbot in Britain to announce the discovery of photography.

Dillwyn's work is considered remarkable because, unlike other photographers of the period, she avoided stiff, formal portraits. Instead, she achieved intimate spontaneity in recording individuals and groups.

In her family garden, she took the first pictures of a snowman, and she was the first of tens of millions of amateur photographers to capture an inquisitive child intruding into what was meant to be a formal composition. Her photo, Peeping, shows a little girl peering beside two lace-bonneted women.

Iwan Jones, the library's head of collections care, said: "She was the first photographer to capture intimate moments. There is a lot of warmth in her work. By using short exposures she was the first - or one of the first - to capture a smile."

Methods used by other enthusiasts during photography's first decade were too slow to catch the smile, or the peeping girl. Dillwyn used a small camera that needed shorter-than-usual exposures, and produced small negatives that concentrated light more easily. Her family was also ahead of others in experimenting with fast chemical paper for the negatives. One of her relatives was the first to exhibit what he called "instantaneous photographs" of waves breaking.

Dillwyn's father, Lewis Dillwyn, was related to Fox Talbot by marriage and was inspired by his work.

Mary gave the album to a niece. It stayed in the family until it was sold to a US buyer last May.

The library said it was "testimony to the early development of an aesthetic application to a new scientific and technical process. It reflects the significant contribution of Wales to the pioneering of photography."