A substrate 103 is set in a film-forming apparatus, such as a metal
organic vapor phase epitaxy system 101, and a GaN buffer film 105, an
undoped GaN film 107, and a GaN film 109 containing a p-type dopant are
successively grown on the substrate 103 to form an epitaxial substrate
E1. The semiconductor film 109 also contains hydrogen, which was included
in a source gas, in addition to the p-type dopant. Then the epitaxial
substrate E1 is placed in a short pulsed laser beam emitter 111. A laser
beam L.sub.B1 is applied to a part or the whole of a surface of the
epitaxial substrate E1 to activate the p-type dopant by making use of a
multiphoton absorption process. When the substrate is irradiated with the
pulsed laser beam L.sub.B1 which can induce multiphoton absorption, a
p-type GaN film 109a is formed. There is thus provided a method of
optically activating the p-type dopant in the semiconductor film to form
the p-type semiconductor region, without use of thermal annealing.