  We study arithmetic properties of certain quaternionic periods of Hilbert
modular forms arising from base change of elliptic modular forms. These periods
which we call the distinguished periods are closely related to the notion of
distinguished representation that appear in work of
Harder--Langlands--Rapoport, Lai, Flicker--Hakim on the Tate conjectures for
the Hilbert--Blumenthal surfaces and their quaternionic analogues. In
particular, we prove an integrality result on the ratio of the distinguished
period and the quaternionic Peterson norm associated to the modular form. Our
method is based on an Euler system argument initiated by Flach by producing
elements in the motivic cohomologies of the quaternionic Hilbert--Blumenthal
surfaces with control of their ramification behaviours. We show that these
periods give natural bounds for certain subspaces of the Selmer groups of these
quaternionic Hilbert--Blumenthal surfaces. The lengths of these subspaces can
be determined by using the Taylor--Wiles method and can be related to the
quaternionic Peterson norms of the modular forms.
