  For a quasi-split connected reductive group $G$ over a local field $F$ we
define a compact abelian group $\tilde\pi_1(G)$ and an extension $1 \to
\tilde\pi_1(G) \to G(F)_\infty \to G(F) \to 1$ of topological groups equipped
with a splitting over $G_\textrm{sc}(F)$. Any character $x : \tilde\pi_1(G) \to
\mu_n(\mathbb{C})$ leads to an $n$-fold cover $G(F)_x$ of $G(F)$ via pushout.
We define an $L$-group $^LG_x$ for this cover that is generally a non-split
extension of $\textrm{Gal}(F^s/F)$ by $\hat G$. We prove a refined local
Langlands correspondence for $G(F)_x$, assuming it is known for connected
reductive groups with the same adjoint group as $G$.
  Motivation for this construction comes from considerations of Langlands'
functoriality conjecture, where subgroups $\mathcal{H} \subset {^LG}$ of the
$L$-group of $G$ arise that need not be $L$-groups of other reductive groups.
If such a subgroup is full and intersects $\hat G$ in a connected reductive
subgroup of maximal rank, we construct a natural triple $(H,x,\xi)$ consisting
of a quasi-split connected reductive group $H$, a double cover $H(F)_x$, and an
$L$-embedding $\xi : {^LH}_x \to {^LG}$ that is an isomorphism onto
$\mathcal{H}$. We expect that genuine representations of $H(F)_x$ transfer
functorially to representations of $G(F)$.
  In the special case of endoscopy, we show that the construction of transfer
factors simplifies when the natural double cover $H(F)_x$ of the endoscopic
group is used. The transfer factor becomes the product of two natural
invariants that do not depend on auxiliary choices. One of them is closely
related to Kottwitz's work on transfer factors for Lie algebras. The other one
is not specific to the case of endoscopy, and will likely play a role in
general functoriality questions. Our work is motivated by work of Adams and
Vogan over the real numbers.
