A spit is a landform created by the deposition of sediment transported by longshore drift. Sediment is carried along the coast until the direction changes, causing deposition and the formation of a curved spit. Over time, the deposited sediment builds up in layers from mudflats to salt marsh and eventually freshwater marsh. As wind directions change, the end of the spit may curve further, forming hooked shapes. Spits can grow across river mouths or bays, diverting rivers or connecting islands to mainland via tombolos.