We prove a portion of a conjecture of Conrad, Diamond, and Taylor, yielding some new cases of the Fontaine–Mazur conjectures, specifically, the modularity of certain potentially Barsotti–Tate Galois representations. The proof follows the template of Wiles, Taylor–Wiles, and Breuil–Conrad–Diamond–Taylor, and relies on a detailed study of the descent, across tamely ramified extensions, of finite flat group schemes over the ring of integers of a local field. This makes crucial use of the filtered $\phi_1$-modules of Breuil.