  In this paper, we establish an explicit higher reciprocity law for the
polynomial ring over a nonprincipal ultraproduct of finite fields. Such an
ultraproduct can be taken over the same finite field, which allows to recover
the classical higher reciprocity law for the polynomial ring $\mathbb{F}_q[t]$
over a finite field $\mathbb{F}_q$ that is due to Dedekind, K\"uhne, Artin, and
Schmidt. On the other hand, when the ultraproduct is taken over finite fields
of unbounded cardinalities, we obtain an explicit higher reciprocity law for
the polynomial ring over an infinite field in both characteristics $0$ and $p
>0$ for some prime $p$. We then use the higher reciprocity law to prove an
analogue of the Grunwald--Wang theorem for such a polynomial ring in both
characteristics $0$ and $p > 0$ for some prime $p$.
