Imposing additional confinement in two-dimensional (2D) materials yields further control over their electronic, optical, and topological properties. However, synthesis of ultranarrow nanoribbons (NRs) remains challenging, particularly for transition metal dichalcogenides (TMDs), and synthesizing TMD NRs narrower than 50 nm has remained elusive. Here, we report the vapor-phase synthesis of ultranarrow TaS2 NRs. The NRs are grown within carbon nanotubes, limiting their width and layer number, while stabilizing them against the environment. The NRs reach monolayer thickness and exhibit widths down to 2.5 nm. Atomic-resolution scanning transmission electron microscopy reveals the detailed atomic structure of the ultranarrow NRs and we observe a hitherto unseen atomic structure supermodulation of ordered defect arrays within the NRs. Density functional theory calculations show the presence of flat bands and boundary-localized states, and help identify the atomic configuration of the supermodulation. Nanotube-templated synthesis represents a unique, transferable, and broadly deployable route toward ultranarrow TMD NR growth.