A piezoelectric resonator includes a piezoelectric resonator element
having a base portion and a resonating arm extending from the base
portion, a package including a bottom to which the piezoelectric
resonator element is fixed and a frame wall that surrounds the bottom and
having an opening above the bottom, and a lid for closing the opening of
the package. In this piezoelectric resonator, the lid includes a main
body having a through-hole formed therein, a flange formed to surround a
periphery of the main body and to be thinner than the main body, and an
optically transparent member located in the through-hole. The flange has
a joining portion with an upper end surface of the frame wall, and the
main body projects in a direction from the flange to the bottom in a
thickness direction. Also, the through-hole is at a position displaced in
a first direction approaching a first end of the main body from a center
of the main body. Also, the flange is joined with the frame wall such
that a clearance between the first end and the joining portion of the
flange nearest to the first end is larger than a clearance between a
second end in a second direction opposite to the first direction of the
main body and the joining portion of the flange nearest to the second
end.