Mr. da Rocha, a native of Ilesha, Nigeria, was captured by slave traders in the 1850's as he walked to a missionary school, Mrs. Oyediran said. Taken to Brazil, he eventually became a prosperous trader in Salvador. In 1870, he returned to Nigeria, settling in Lagos, and quickly built a small fortune plying the lucrative South Atlantic trade routes.

When Mr. da Rocha - and other prosperous 19th-century Nigerian merchants - wanted to build houses to match their means, they turned to the local community of Brazilian artisans. Freed Brazilian slaves had started returning to Nigeria in the late 1830's. By 1880, out of a population of 37,458, Lagos had 3,221 Brazilians and 111 Europeans.

''If you had any work to do, you called on a Brazilian descendant to make sure it was done right,'' Mrs. Oyediran said.

Water House, which has suffered from remodeling by later generations, still bears many touches of the Brazilian craftsmen: leafy plaster flourishes in the corners of the parlor ceiling and wrought-iron balustrades on the second-floor balcony.

The Brazilian stamp is most evident in the modest, whimsical houses that survive, both in downtown Lagos and across Lagos Lagoon in the old suburb of Ebute Metta, in contrast to indigenous building styles.

''Traditional Yoruba buildings have very plain, flat mud walls that are sometimes whitewashed,'' said Richard E. Ammann, an American living here and a former professor at the University of Nigeria. ''It was the Brazilians who brought in this ornate styling, the rounded doorways and windows, the pointed tops.''

On a recent Sunday morning, Ayo Vaughan-Richards took advantage of the weekly lull in Lagos traffic to take a visitor on a Brazilian architectural tour. Mrs. Vaughan-Richards, who grew up in a Brazilian house, is the descendant of an American slave of Nigerian origin who was freed in Camden, S.C., in 1825.