Main

Cardiac activity during early embryonic development has been documented for more than 2,000 years (refs. 4,5). However, in vivo observations of physiological function in the heart primordium have been limited in spatiotemporal resolution and sample size6,7,8,9,10,11. This scarcity of data means that the bioelectrical mechanisms for the emergence of organized cardiac function are still poorly understood. We asked, how does the heart go from silent to regular beating? What are the intermediate activity states, and how do these states emerge from the ensemble of single-cell developmental trajectories12? Here we applied all-optical electrophysiology13 to observe the first few beats of developing zebrafish hearts and to assess the electrical excitability and connectivity patterns underlying these dynamics.

Capturing the first heartbeat

A first heartbeat is a once-in-a-lifetime event. We sought to capture this event by means of calcium imaging as zebrafish embryos developed from 18–22 hours postfertilization (hpf) (Fig. 1a). During this period, the bilateral cardiac progenitor populations converge and form the heart cone, and early heartbeats have been reported at homologous developmental stages in the chick, rat and mouse6,7,8,9,10,11. At this stage, the progenitors are differentiating into distinct cell types, so we ubiquitously expressed the genetically encoded calcium indicator jGCaMP7f (ref. 14) to capture activity that might be missed by tissue-specific expression. To acquire robust statistics, we combined a system for wide-area all-optical electrophysiology15 with a custom agarose mould for live imaging of up to 18 embryos concurrently (Fig. 1b, Supplementary File 1, Supplementary Videos 1 and 2 and Methods). This system produced consistent recordings across experiments (Extended Data Fig. 1a). Commonly used tools for arresting cardiac and skeletal muscle motion (tnnt2a morpholino and alpha-bungarotoxin messenger RNA (mRNA), respectively) had little effect on the calcium activity (Extended Data Fig. 1b–d). A second red-shifted genetically encoded calcium indicator, FR-GECO1c (ref. 16), also recorded similar dynamics and time of initiation (Extended Data Fig. 1e–g). Dynamics were uncorrelated between neighbouring embryos, implying minimal mechanical or chemical coupling (Extended Data Fig. 1h). These results establish that our experimental preparation faithfully captured the early development of zebrafish cardiac physiology.

Fig. 1: Multiplexed time-lapse calcium imaging captures the first heartbeats of zebrafish embryos.
figure 1

a, Injection of mRNA encoding jGCaMP7f for whole-embryo Ca2+ imaging during zebrafish heart cone formation. A, anterior; P, posterior; L, left; R, right. b, Low-magnification microscopy platform and array mount for multiplexed live imaging and all-optical electrophysiology. DMD, digital micromirror device. c, Representative Pearson correlation (green) of individual pixel time traces to putative cardiac activity (three out of three experiments). Activity maps are overlaid on grayscale images of baseline fluorescence. Scale bar, 500 µm. d, Histogram of time of onset of the first cardiac calcium spike (n = 39 embryos, three experiments). e, jGCaMP7f ΔF/F measurements of representative hearts aligned by the first calcium spike. f, Zoomed-in traces from e.

Source data

Within each embryo, the primordial heart showed an abrupt transition from quiescence to calcium spiking with a stereotyped waveform. These transitions occurred in a tight developmental window of 20.3 ± 0.4 hpf (mean ± s.d., n = 39 embryos; Fig. 1c–e and Methods). Calcium dynamics mostly colocalized with fluorescent protein reporters in Tg(myl7:eGFP)17 and Tg(−36nkx2.5:ZsYellow)18 lines, suggesting that the activity occurred in developing cardiomyocytes (Extended Data Fig. 2a–c). Consistent with previous reports, rhythmic calcium dynamics were present before mechanical contractions could be detected (typically 21–22 hpf) using brightfield microscopy (Supplementary Videos 3 and 4)7,8,11. We refer to the first large-scale calcium transient as the first heartbeat.

We next asked whether the first heartbeat engaged the whole tissue or was confined to a subset of cells. Before the first heartbeat, we observed occasional single-cell calcium transients, as has been reported previously11. These events were infrequent (0.2–0.7 per minute), long-lived (3.40 ± 2.09 s), lacked a sharp peak and were asynchronous between cells, making them qualitatively distinct from the first heartbeats (Fig. 2a and Extended Data Fig. 3a–d). The first beat usually engaged more than 4,000 μm2 of tissue, comprising most of the heart primordium, compared to a typical cell size of 82 μm2 (Extended Data Fig. 3e,f and Supplementary Video 5). However, the first beat occasionally (3 times out of 39) preceded the electrical fusion of the two progenitor fields and only propagated through half of the heart (Fig. 2a and Extended Data Fig. 3g–i). In such cases, the beat engaged the contralateral side within 30 min. During the hour after the first beat, the spatial extent of the spikes and the spatially averaged spike amplitude only increased slightly (area 35 ± 47% increase, amplitude 22 ± 27% increase) and spike width decreased only slightly (−24 ± 10% decrease), (Fig. 2b–d and Extended Data Fig. 3j–o). Therefore, the initiation of the heartbeat was a step change from sparse and slow single-cell transients to sharp, tissue-scale spikes that remained relatively stable in spatial extent and waveform over the following hour of development.

Fig. 2: The heartbeat starts by means of a noisy tissue-wide SNIC bifurcation.
figure 2

a, Single-cell calcium transients followed by a large-scale coherent event at t = 0 (three out of three embryos, quantified in Extended Data Fig. 3a–d). Scale bar, 50 µm. b, Spike-triggered average waveform over 50 spikes for individual embryos at onset and 1 h postonset. Error bar is standard deviation over spikes at each time sample. c,d, Average transient amplitude (c) and spike width (d) over 50 beats starting from the first beat and starting from 1 h later. Circles linked by lines represent successive measurements in the same embryo. Boxplots represent IQR (25th, 50th, 75th percentile) with whiskers representing 1.5× IQR. e, Population distribution of ISIs in selected 10-min windows relative to the first heartbeat. f,g, Beat rate (f) and ISI coefficient of variation (ISI CV; g) aligned to the first heartbeat. Black line, median; dotted lines and shading, IQR and coloured lines, representative individual traces. h, Example traces of the first calcium spikes (Expt., experiment, green; top trace is the middle trace from Fig. 1f, reproduced) and QIF-generated simulation (blue). i,j, Experimental frequency (i) and CV (j) jointly fit to the QIF model (dashed line, Supplementary Information, Extended Data Fig. 4) with linear scalings of drive current to developmental time. Shaded region is ±95% CI. bj, Same individuals as Fig. 1d, n = 39 embryos, three experiments. k, Phase portrait of the QIF model as it undergoes a SNIC bifurcation (Supplementary Information). l, Schematic describing emergence of spiking regimes in the early heartbeat driven by a noisy phase transition. Shading schematically illustrates noise in rest and threshold values. Statistical tests: c, T = 27.0, ****P = 4.1 × 10−7; d, T = 0.0, ****P = 5.3 × 10−8. Two-sided Wilcoxon signed-rank test.

Source data

Dynamics of the early heartbeat

We then investigated how the heartbeat became periodic. The first few beats were infrequent and irregularly spaced in time. The interspike interval (ISI) became shorter and more uniform as the heart developed (Fig. 2e). The heart rate increased from 7.1 ± 3.3 beats per minute (bpm) at 10 min postonset (mpo) to 29.6 ± 7.9 bpm at 120 mpo (Fig. 2f). We quantified the heart rate variability by the coefficient of variation (standard deviation/mean) of the ISI. An ISI coefficient of variation of 1 corresponds to a Poisson process and ISI coefficient of variation of 0 corresponds to perfect periodicity. The ISI coefficient of variation decreased from 0.62 (0.44–0.83) (denoted as ‘median (interquartile range (IQR))’ throughout the text) at 10 mpo to 0.37 (0.26–0.52) at 120 mpo (Fig. 2g).

Excitable to oscillatory transition

The mean heart rate and ISI coefficient of variation of individual embryos followed stereotyped trajectories when aligned temporally to the first beat, suggesting a characteristic transition underlying the dynamics (Fig. 2f,g). We thus sought to understand the nature of the transition from quiescence to beating. This transition can be described as a codimension-1 bifurcation, that is, a step change in dynamics driven by a continuous change in a control parameter. There are just four classes of codimension-1 bifurcations into an oscillatory state19. The class of bifurcation determines an oscillator’s qualitative dynamics, including oscillation amplitude, frequency and stability, as well as its response to perturbations. Efforts to classify bifurcations in biological oscillators have yielded important insights into physiological function, for example in the computational properties of neurons19,20,21 and the sensing mechanisms of cochlear hair cells22. We therefore sought to assign the initiation of the heartbeat to one of these classes.

We compared our experimental results to simulated excitable-to-oscillatory transitions, using the action potential model of Morris and Lecar, which is the simplest model that allows simulation of all four bifurcation types (Supplementary Information and Extended Data Fig. 4a,b)23. To capture the beat-rate variability in the system, we added white noise to the drive current. Only the saddle-node on invariant circle (SNIC) bifurcation captured the experimental spike timing statistics (Extended Data Fig. 4c). The other bifurcations also differed qualitatively from the data (Supplementary Information), showing graded oscillation amplitude (supercritical Hopf bifurcation) or bistability between oscillatory and silent states (saddle-node, subcritical Hopf bifurcations). By contrast, the SNIC bifurcation predicted a relatively constant spike amplitude near the bifurcation point, and an absence of bistability between silent and spiking states, both consistent with our data.

All SNIC bifurcation models have similar dynamics near the bifurcation point24, so we proceeded with the simplest, the quadratic integrate-and-fire (QIF) model19 (Supplementary Information). The noisy QIF model comprises just a ‘spiking’ variable, φ, and two free parameters, the ‘injected current’, I, and the noise power, σw2. Intuitively, I determines the distance between a stable resting state and an excitation threshold. When φ crosses the excitation threshold, φ spikes and then returns to the resting state (Extended Data Fig. 4d,e). As I increases, the resting state and excitation threshold get closer until they annihilate each other, yielding the transition from excitable to oscillatory. Within a range of values of σw2, the noisy QIF model captured the evolution of both mean beat frequency and ISI coefficient of variation with just a linear scaling of I to developmental time (Fig. 2h–j and Extended Data Fig. 5a–c). The QIF model also reproduced the probability distributions and temporal autocorrelation functions of the experimental ISIs (Extended Data Fig. 5d–g). In summary, the periodic heartbeat emerges through a phase transition-like SNIC bifurcation, bridged by a regime of noisy spontaneous spiking (Fig. 2k,l).

Calcium-voltage coupling

The SNIC bifurcation suggests that early calcium transients arose by noisy crossing of an excitation threshold, followed by positive feedback amplification. The threshold and positive feedback could come from voltage-dependent ion channels, for example voltage-gated calcium channels (VGCCs), or from voltage-independent intracellular mechanisms, for example calcium-induced calcium release25,26. To distinguish these possibilities, we generated a transgenic zebrafish line coexpressing jGCaMP7f and a voltage indicator, Voltron1 (ref. 27), in the heart primordium (Fig. 3a). To improve expression in the heart primordium, we developed a new chimeric promoter (zACNE20-myl7 (z20m); Extended Data Fig. 6). Expression under z20m colocalized with myl7 mRNA and pan-myosin heavy chain antibody (MF-20), markers for myocardium (Extended Data Fig. 6). We used a dual-wavelength imaging system and a red-shifted HaloTag ligand dye to simultaneously capture membrane voltage, Vmem, and calcium activity in Tg(z20m:Voltron1-P2A-jGCaMP7f) embryos (Fig. 3b–d and Supplementary Video 6).

Fig. 3: The first heartbeats comprise voltage and calcium spikes.
figure 3

a, Genetic construct for simultaneous imaging of calcium and membrane voltage (Vmem). b, Calcium (green) and Vmem (purple) dynamics. The top shows the specimen before onset of calcium dynamics, the middle shows the early heart primordium (6 bpm, estimated 15–30 mpo) and the bottom shows the more mature specimen (25 bpm, estimated 110 mpo). c, Spike-triggered averages (STAs) of the bottom two traces in b. d, Isochronal lines of Vmem action potentials corresponding to the 6 and 25 bpm recordings in b and c. Grayscale image, absolute value of the first spatial principal component (PC) of the calcium recording. Scale bars, 50 µm. e, Distribution of lags between voltage and calcium action potential upstrokes (Methods). ae, 40 recordings from 36 embryos in one experiment. Data from f and g are included in analysis. f, Dual recordings of Vmem and calcium for control and CaV1.2 knockdown (KD; cacna1c morpholino) embryos at 22–23 hpf. g, Comparison of amplitude of electrical events in control and knockdown embryos. Boxplot represents IQR (25th, 50th, 75th percentile) with whiskers representing 1.5× IQR. Control, n = 7 embryos; KD, n = 15 embryos. Statistical test, g, U = 112, **P = 2.16 × 103. Mann–Whitney–Wilcoxon two-sided test.

Source data

After the onset of beating, there was a 1:1 relation between spikes in Vmem and in calcium. The electrical upstroke preceded the Ca2+ upstroke by 97 (76–131) ms (Fig. 3c,e), longer than the difference in sensor kinetics (Voltron1 and jGCaMP7f have half-rise times of 0.44 and 27 ms, respectively). Both voltage and Ca2+ propagated through the tissue as coherent waves, with Ca2+ lagging Vmem in space (Fig. 3d and Supplementary Video 6), consistent with our previously observed tissue-scale initiation of the heartbeat (Fig. 2a, Extended Data Fig. 3 and Supplementary Video 5). We did not observe any voltage spikes above baseline noise before the onset of Ca2+ spiking (Fig. 3b, Extended Data Fig. 1k–o and Methods). Thus, the first few beats comprised electrical action potentials and an accompanying calcium transient.

Because calcium elevation followed voltage depolarization, we probed the role of VGCCs in driving the early dynamics. We performed morpholino knockdown of cacna1c, which encodes the pore-forming α 1c subunit of the L-type VGCC CaV1.2 (ref. 28). In cacna1c morphants, neither calcium transients nor electrical action potentials could be detected by 22–23 hpf (Fig. 3f,g and Extended Data Fig. 7a–c). This finding points to CaV1.2 as the dominant channel for the earliest action potential upstrokes, consistent with pharmacological studies in 36 hpf fish29 and early mouse hearts11,30.

We further investigated several other transporters that are important for electrical automaticity in adult pacemaker cardiomyocytes (Extended Data Fig. 7d–h). Morpholino knockdown of the sodium-calcium exchanger ncx1 slowed the decay of the earliest calcium transients and eventually generated long calcium plateaus, consistent with its role in removing excess calcium from the cytosol. In more mature pacemaker cells, intracellular Ca2+ fluctuations are thought to contribute to spontaneous spiking by means of an NCX1-mediated current30,31. Knockdown of ncx1 did not delay the first calcium transients (Extended Data Fig. 7e), suggesting that this mechanism is not yet active in the first heartbeats.

Morpholino knockdown of hcn4, which generates the hyperpolarization-activated ‘funny current’32, also did not delay the first few beats and furthermore had no effect on spontaneous calcium dynamics (Extended Data Fig. 7f–h). This observation is consistent with a previous report that the funny current only becomes active between 54 and 102 hpf (ref. 29). Knockdown of atp1a1a, a subunit of the Na+, K+-ATPase important for regulating resting Vmem (ref. 33), delayed initiation and slowed the acceleration of heart rate, consistent with a view that electrical polarization is necessary for the first few beats. Together, these experiments establish depolarization-activated transmembrane Ca2+ currents as the driver of the first few beats.

Excitability precedes spontaneity

A key prediction of the SNIC bifurcation model is that it should become increasingly easy to excite action potentials in the time approaching the first spontaneous beats, as the baseline Vmem and threshold approach each other (Fig. 2k,l). To test this prediction, we used the channelrhodopsin CoChR34 to optogenetically depolarize the heart primordium while imaging with FR-GECO1c (Fig. 4a). We applied periodic impulses of blue light targeted to the whole heart and measured the probability of evoking a calcium transient as a function of developmental time (Fig. 4b and Supplementary Video 2). We observed all-or-none responses to individual stimuli, indicative of coherent tissue-wide responses that resembled later spontaneous heartbeats. The heart became optogenetically excitable in a window 90 min before the first spontaneous beats (Fig. 4b–d). Within individual embryos, the response rate to optogenetic stimuli increased from 0% to close to 100% in typically less than 5 min. This rapid transition is qualitatively consistent with the phase transition-like behaviour observed in the endogenous dynamics (Fig. 1e,f and Extended Data Fig. 1f–i). Optogenetic stimulus before spontaneous beating did not affect when the heart subsequently started beating spontaneously or its rate (Extended Data Fig. 1i,j). Optogenetic stimuli did not evoke beats in cacna1c morphant fish (Extended Data Fig. 7i,j), consistent with the key role for CaV1.2 in driving the early action potential.

Fig. 4: The heart primordium is excitable and electrically coupled before the first heartbeat.
figure 4

a, Genetic construct for simultaneous optogenetic stimulation and calcium imaging. b, Repeated testing of response to optogenetic stimulation (Methods) in silent hearts. Black triangle indicates the first detected spontaneous beat. c, Response rate to optogenetic stimuli in individual embryos. Response rate for embryos not expressing CoChR was a result of spontaneous transients randomly aligning with blue light pulses. d, Fraction of the population showing a greater than 50% response rate. c,d, n = 5 embryos −CoChR, n = 21 embryos +CoChR, two experiments. e, Activation map for triggered averages of calcium elevation evoked by localized stimulus before heartbeat initiation. Scale bar, 50 µm. f, Wave propagation speeds for early spontaneous (spon.) activity and activity evoked before first heartbeat. Spontaneous, 90 30-s recordings, n = 12 embryos, 3 experiments. Evoked, 13 45-s recordings, n = 7 embryos, 2 experiments. Circles represent individual recordings. Boxplot represents IQR (25th, 50th, 75th percentile) with whiskers representing 1.5× IQR. Statistical tests: t = 0.60, not significant (NS) P = 0.55. Two-tailed unpaired t-test.

Source data

To understand how the first heartbeats typically engaged the entire heart field (Supplementary Video 5), we investigated the nature of cell coupling before the first few beats. During the epoch in which the heart was excitable but not yet spontaneously active, we targeted optogenetic stimuli to small subregions of the heart in Tg(z20m:FRGECO1c-P2A-CoChR-eGFP) fish. These stimuli elicited propagating calcium waves that initiated at the stimulus location (Fig. 4e and Supplementary Video 7). Therefore, cells were coupled before the initiation of the spontaneous heartbeat and could be excited not only by external stimuli but also by their neighbours. Wave propagation speeds were similar between precocious optically evoked waves, 617 (567–767) µm s−1, and early spontaneous activity, 646 (465–772) µm s−1 (not significant, Fig. 4f). These speeds were an order of magnitude faster than reported values for calcium waves driven by diffusion of small molecules35. Immunofluorescence showed expression of the gap junction protein connexin-43 as early as 18 hpf (Extended Data Fig. 8). These observations combined with our measurements of voltage excitability and action potential propagation (Fig. 3d) suggest that wave propagation was mediated by sharing of Vmem between cells, consistent with gap junction coupling. The presence of both electrical excitability and coupling thus primes the heart for a tissue-wide response to the first spontaneous action potential, explaining the sudden transition from silence to large-area coherent heartbeats.

Spatial origins of electrical waves

The capacity for spontaneous activity is widespread in embryonic cardiomyocytes and gradually becomes localized to cells in molecularly distinct pacemaker regions during development1,2,3. Reports on the spatial locus of initiation (LOI) of early heartbeats vary6,7,8, and the mechanisms determining its location in the early heart are unknown. To locate the early LOI in zebrafish hearts, we made high-speed (100 Hz) calcium-imaging maps of the spontaneous heartbeats at 20–22 hpf, using the jGCaMP7f reporter (Fig. 5a and Methods). The LOI was variable in location between embryos (Fig. 5b) with a bias for the anterior-left quadrant of the heart cone (38 out of 71 observations across ten embryos). The LOI was typically stable for more than 10 min, but large and sudden displacements of the LOI (greater than 200 µm h−1) between recordings occurred occasionally (mean of one event per 70 min; Extended Data Fig. 2d).

Fig. 5: Initiation of the early heartbeat is set by competition between spontaneously firing cells.
figure 5

a, Activation maps of spontaneous activity in a representative embryo, showing drift of the LOI (white/red triangle in all panels). Scale bar, 50 µm. Cyan, nkx2.5:ZsYellow and red, TCF:nls-mCherry. b, LOI trajectories for individual embryos. Star indicates initial measurement, arrowhead final measurement. Imaging intervals between 5.5 and 30.5 min (mean 14.6 min). Green dashed line indicates the approximate extent of the (strongly) Nkx2.5++ region. Scale bar, 25 µm. c, Distance of LOI from Nkx2.5++ region inner edge. d, nkx2.5:ZsYellow intensity at LOI show outwards migration. bd, n = 12 embryos and three experiments. e, Simultaneous optogenetic silencing and calcium imaging. f,f, ΔF/F traces showing localized silencing. Purple, spontaneous LOI and green, non-LOI region. Blue hexagon, optogenetic silencing target. gg′′, Activation maps of unperturbed activity (g) and during targeted silencing at non-LOI (g′) and LOI (g′′). Scale bar, 50 µm. h, Relative calcium transient amplitude (A) in the silenced ROI (+, median 0.22 and IQR 0.11–0.40) and distally (−, median 0.56 and IQR 0.35–0.71). i,j, Relative heart rate (f) (i) and LOI displacement (j) as a function of optogenetic silencing location. hj, 39 observations, 13 embryos and 5 experiments. k, Schematic describing early heartbeat spatial patterning. All boxplots represent IQR with whiskers representing 1.5× IQR. Statistical tests: t = −4.6, **P = 1.4 × 10−3 (c); W = 5, *P = 2.0 × 10−2 (d); U = 4,350, ****P = 1.5 × 10−8 (h); t = 3.0, **P = 5.3 × 10−3 (i); U = 300, **P = 2.0 × 10−3 (j). Two-tailed paired t-test (c), two-sided Wilcoxon signed-rank test (d), Mann–Whitney–Wilcoxon two-sided test (h,j) and two-tailed unpaired t-test (i). a.u., arbitrary unit.

Source data

We sought to relate the functional LOI to the underlying pattern of cell identities. The zebrafish heart cone has a well-defined fate map, with distal regions of the cone contributing to the inflow tract, pacemakers and atrium, and proximal regions contributing to the ventricle and outflow tract36,37. The early LOI (15–45 mpo) resided primarily in the proximal heart cone and colocalized with myl7:eGFP (Extended Data Fig. 2e,f). The LOI drifted outwards as development progressed (15 mpo, 29 (25–31) µm from the inner edge; 105 mpo, 54 (44–65) µm; Fig. 5a–c). Consistent with its anatomical trajectory, the initial LOI expressed nkx2.5:ZsYellow more strongly than the later LOI (Fig. 5d).

The proximal Nkx2.5+ location (Extended Data Fig. 2g) of the initial LOI contrasts with the concurrent specification of a reported pacemaker lineage in a distal (roughly 100 µm outwards) and sparse Isl1+/TCF+ population undergoing downregulation of Nkx2.5 (ref. 37). At later stages (roughly 22 hpf), the LOI was located in a region of TCF+ cells (Fig. 5a) with reduced nkx2.5:ZsYellow fluorescence (Fig. 5d). There is little cell mixing during zebrafish heart tube formation (Supplementary Video 8, refs. 38,39), confirming that the relative positions of different cell fates are preserved. Consistent with this notion, relative nkx2.5:ZsYellow intensity at the original location of the LOI at 15 mpo was unchanged at 105 mpo (Extended Data Fig. 2h). These observations imply that the LOI moved between cell populations. In summary, the location of the early LOI is not precisely specified, but it is preferentially located in the future ventricular myocardium. This location is spatially distinct from the cells that ultimately become pacemakers.

Dynamical determinants of LOI position

The SNIC model predicts that the spontaneous frequency depends strongly on the bifurcation parameter. In a tissue in which there are gradients and spatial variability in developmental trajectories (Fig. 5a–d), one would expect a diversity of spontaneous frequencies. How, then, does the tissue produce coherent beats that emerge from a relatively stable LOI?

We proposed that electrical coupling between cells led to phase locking to the highest frequency oscillator. To test this hypothesis, we used the hyperpolarizing anion channelrhodopsin gtACR2 (ref. 40) and targeted illumination to selectively silence different regions of the heart (Fig. 5e–h and Supplementary Video 9), while simultaneously monitoring calcium with FR-GECO1c. Silencing of the LOI caused a drop in spontaneous frequency, f, and the emergence of a new LOI in a different spot, whereas silencing non-LOI regions caused notably smaller relative frequency drops (fafter/fbefore, LOI silenced, 0.87 (0.66–1.07); non-LOI region silenced, 1.15 (0.96–1.25)) and little LOI displacement (LOI silenced, 70 (47–87) µm; non-LOI region silenced, 25 (15–46) µm: Fig. 5i,j and Supplementary Video 9). These observations indicate the presence of several potential LOIs, with the actual wave origin set by the one with the fastest natural frequency. This mechanism resembles the ‘overdrive suppression’ that determines the heartbeat initiation site in the adult cardiac conduction system41. The presence of overdrive suppression is consistent with previous suggestions based on experiments in dissociated embryonic cardiomyocytes and surgically or genetically perturbed hearts6,42,43, but to our knowledge has not previously been identified in the intact embryonic heart.

We further tested the overdrive suppression model by focal CoChR pacing of spontaneously active hearts at different frequencies. The optogenetic stimuli only changed beat rate and LOI position when the stimulus frequency was faster than the spontaneous frequency (Extended Data Fig. 9). Furthermore, once pacing stopped, the LOI immediately returned to its previous rhythm and location, with no apparent memory of pacing (Extended Data Fig. 9). The presence of relatively stable LOI locations and an outwards drift punctuated by occasional jumps suggests competition among many cellular oscillators, each with asynchronous maturation towards gradually increasing spontaneous beat rate.

Robustness to electrical heterogeneity

We then asked whether a spatially extended model of an excitable-to-oscillatory transition could account for the above observations on LOI position and response to perturbations. We simulated resistively coupled Morris–Lecar oscillators undergoing a SNIC bifurcation, with a linear spatial gradient of input current, I, to model the observed clustering of the LOI in the anterior-left quadrant. Despite dynamic current noise and static heterogeneity of excitability, the simulations produced coherent waves that emerged from a single LOI and swept the tissue under a broad range of parameters (Supplementary Information and Extended Data Fig. 10). A time-dependent offset in the current recapitulated the beat-rate statistics, as in the single-oscillator QIF model (Extended Data Fig. 10 and Fig. 2f–j). Thus, our model can explain how noisy and gradually changing single-cell excitability properties can produce abrupt and tissue-wide changes in action potential dynamics.

Discussion

Our work provides a coherent picture for how the heart starts beating (Fig. 5k). The heart becomes electrically coupled and excitable before the first spontaneous beats. Beating begins as the result of a SNIC bifurcation resulting in a sudden transition to full-fledged, CaV1.2-dependent action potentials that sweep the tissue. Overdrive suppression among many spontaneously active units in the proximal heart cone then assures the presence of one, and only one, LOI in a single beat. The determination of the early LOI is not driven by a molecularly distinct ‘pacemaker’ cell-type, but rather emerges by biophysical interaction of spatially distributed and noisy oscillators. Isl1+/Nkx2.5 pacemaker cells only begin to act as the LOI later in development.

The use of advanced optical electrophysiology tools in zebrafish allowed us to characterize this intricate process with high resolution in a minimally invasive way. We observed many features consistent with past studies in amniote embryos, including: asynchronous single-cell calcium transients before the first few beats11, major functional roles for VGCCs and NCX11,30, electrical and calcium spikes before mechanical contractions7,8,11 and variability and lability of the spatial origin of heartbeats9. These similarities indicate that many of the early events in heartbeat functional development are conserved across vertebrates. Our results unify these observations and identify how they contribute to the spatiotemporal organization of the earliest cardiac dynamics.

Our data show that the spatial structure of the first heartbeats undergoes a rapid step transition to tissue-scale engagement, but the temporal structure goes through a noisy intermediate between quiescence and periodicity. All biological dynamics are affected by noise, including oscillations44 and bifurcations45. Living systems must overcome this variability to achieve order46,47, but in many cases noise plays an important role in function48. The initiation of the zebrafish heartbeat falls into this latter category. A simple, well-studied model49 of a stochastic SNIC bifurcation captured all the dynamical steps between quiescence and regular beating.

The function of early self-organized electrical activity is unclear. A rhythmic, spatially structured beat arises well before connection to the circulatory system and blood pumping and is not necessary for survival in early zebrafish embryos50. Early activity may contribute to further cardiovascular development, for example, by calcium signalling51 or mechanical contractility52,53. Robust strategies to initiate physiological function are likely to be broadly important for the progression of embryonic organogenesis.

Methods

Zebrafish strains and maintenance

All vertebrate experiments were approved by the Institutional Animal Care and Use Committee of Harvard University (protocol 10-13-4) or the Harvard Medical Area Standing Committee on Animals (study IS00001263-3). The zebrafish (Danio rerio) AB wild-type strain was used for all experiments and generation of transgenic fish. Adult fish were raised at 28.5 °C on a 14 h light/10 h dark cycle. Embryos were collected by crossing female and male adults (3–24 months old). The transgenic lines used in this study are: TgBAC(36nkx2.5:zsYellow)20, Tg(7xTCF-Xla.Siam:nlsmCherry)54, Tg(zACNE20:2xLyn-mCherry) as allele hm71 (this study), Tg(zACNE20:FRGECO1c-P2A-CoChR-eGFP) as allele hm72 (this study), Tg(zACNE20-myl7:Voltron1-P2A-jGCaMP7f) as allele hm73 (this study) and Tg(zACNE20-myl7:FRGECO1c-P2A-CoChR-eGFP) as allele hm74 (this study). Plasmids used to generate the fish lines by Tol2 transgenesis are deposited at Addgene.

Morpholinos, RNA constructs and microinjection

Morpholinos (Gene Tools) tnnt2a-MO (ref. 50) (4 ng), cacna1c-MO1 (ref. 51) (2 ng), cacna1c-MO2 (ref. 51) (2 ng), atp1a1-MO (ref. 33) (1.5 ng), ncx1h-MO (ref. 55) (2 ng) and hcn4-MO (ref. 32) (0.2 pmol) were injected at the one-cell stage. The function of each of these morpholinos has been previously validated (Supplementary Table 1). Synthetic mRNAs were transcribed from linearized pMTB plasmid56 containing insert of interest using the mMessage mMachine SP6 in vitro transcription kit (Thermo Fisher Scientific) and injected at the one-cell stage with 0.1% phenol red (Supplementary Table 2). Morpholino and mRNA sequences are given in Supplementary File 2.

Sample preparation for live functional imaging

Embryos were injected at the one-cell stage with 20 pg mRNA encoding alpha-bungarotoxin, a peptide acetylcholine receptor blocker, to immobilize tail movements57, 4 ng tnnt2a morpholino if performing spatially resolved recordings to eliminate cardiac motion artefacts and the appropriate mRNAs for reporters and channelrhodopsins (Supplementary Table 2). Embryos were raised at 28.5 °C to 16–20 somite stage (17–19 hpf). Egg chorions were removed by immersing embryos in 1 mg ml−1 Pronase protease (Sigma) in 0.3× Danieau buffer (17.4 mM NaCl, 0.21 mM KCl, 0.12 mM MgSO4, 0.18 mM Ca(NO3)2, 1.5 mM HEPES, pH 7.2) for 7 min at room temperature followed by gentle mechanical agitation. A mount was cast in 1.5% agarose in 0.3× Danieau using a custom ‘shark-fin’ mould (acrylic ‘fine detail plastic’, Shapeways; designed in Autodesk Inventor 2020; Supplementary File 1) in 35 or 100 mm Petri dishes. Embryos were mounted in 0.3× Danieau and affixed by placing a 0.17 mm glass coverslip over the mount array (×25 imaging) or with a 0.15% low-melt agarose overlay solution (×2 imaging). Figure-wise details of imaging preparations are given in Supplementary Table 2.

Functional imaging with patterned optogenetic stimulus

Live imaging was performed at 28.5 °C or at room temperature using custom optical setups (Fig. 1a)15,58. For recordings of jGCaMP7f dynamics, widefield illumination was supplied (0.5–1 mW mm2) using a 488 nm laser (Coherent Obis) or a 470 nm LED. For spectrally orthogonal stimulation and recording, a 594 nm LED or laser (Cobolt Mambo 100 mW) was used for recording (1–2 mW mm2 when recording at 50 Hz, 0.6 mW mm2 when recording at 10 Hz) and blue light from a 488 nm laser or 470 nm LED (0.5–25 mW mm2) was patterned by programming a digital micromirror device (ViALUX DLP7000 or Texas Instruments Lightcrafter DLP3000). Imaging was performed through a ×25 numerical aperture (NA) 1.0 objective (Olympus XLPLN25XSVMP2), or ×2 NA 0.5 objective (Olympus MVPLAPO 2XC). Data were recorded on an Orca Flash v.4.0 camera (Hamamatsu) at 10–100 Hz framerate. Temporal control of lasers, digital micromirror device and acquisition was performed using custom MATLAB software through a National Instruments DAQ interface. Image analysis methods are described in the Supplementary Information.

In multiplexed measurements of excitability before initiation of the heartbeat, embryos were mounted at 19–20 somites stage (18.5–19 hpf) as described in the section ‘Sample preparation for live functional imaging’. Regions of interest for optogenetic targeting were selected manually using guidance from anatomical features and kept constant during the experiment. Spontaneous activity was recorded for 30 s, and then embryos were subjected to a train of 20 lots of 25 ms blue light pulses at a period of 5 s. Spontaneous activity was then recorded for another 30 s. This was repeated every 5 min.

In gtACR2 targeting experiments, activation maps for spontaneous activity were used to define an LOI target for optogenetic silencing. Several other ‘Not LOI’ targets for optogenetic silencing were also tested for each embryo. ‘Not LOI’ targets were defined as those that were above the 50th percentile (47 μm) of distances (across all experiments) from the spontaneous LOI.

Confocal microscopy and morphological analysis

Live imaging was performed at 28.5 °C using a LSM 980 confocal microscope and Zen v.3.2 software (Zeiss). All image stacks were filtered with a 5 × 5 × 1 × 1 (xyzt, pixel × pixel × section × frame) median filter to reduce shot noise before further processing. Approximate cell sizes and location of the inner edge of the heart cone were determined by manual tracing of maximum intensity projection images in ImageJ (v.1.53t). Intensity and distance measurements were performed with Python (release v.3.9) scripts using the Scipy stack.

Cellular-resolution imaging of the first heartbeats was performed by scanning a single plane at 3 Hz. Images were filtered with a 5 × 5 × 1 × 1 (xyzt, pixel × pixel × section × frame) median filter and twice downsampled in space. Active area was calculated in each frame by summing the number of pixels with intensity greater than 45% of a reference peak value (99.9th percentile of all intensities in the video). To generate videos (Supplementary Video 5), the original recording was filtered with a Gaussian kernel ((σx, σy, σt) = (2 pixel, 2 pixel, 3 frame)) and ΔF/F was obtained by pixelwise dividing each intensity by the tenth percentile over time.

Simultaneous voltage and calcium imaging

Tg(zACNE20-myl7:Voltron1-P2A-jGCaMP7f) embryos were collected and injected with immobilizing agents as described above. Embryos were dechorionated between 6 and 10 hpf using Pronase and incubated overnight in 500 nM JaneliaFluor 608 dye in 0.3× Danieau with 0.5% dimethylsulfoxide (DMSO). At 18 hpf, the embryos were rinsed in 0.3× Danieau, 0.5% DMSO twice for 10 min each, and mounted as described above. Embryos were concurrently illuminated with 488 and 594 nm lasers as described above. Emission light was split using a dichroic mirror and imaged on two sCMOS cameras (Hamamatsu). Registration was performed by imaging a digital micromirror device-projected pattern on both cameras and solving the affine transformation mapping manually defined interest points. Calcium transients were identified by defining a mask based on the first spatial principal component of dynamics in the jGCaMP7f channel and performing spike detection on the average trace as described for other experiments. Candidate matched filter kernels were selected by inspecting the calcium spike-triggered averages traces of Voltron1 fluorescence and used to quantitatively detect voltage spikes (Supplementary Information).

Whole mount immunostaining and in situ hybridization

Immunostaining was performed as described in ref. 59 with some modifications. Briefly, embryos were fixed in 2% paraformaldehyde in PBS at room temperature for 2 h. Embryos were partially de-yolked with forceps before blocking (10% normal goat serum, 1% bovine serum albumin, 0.3% Triton X-100) and application of primary antibodies (4 °C, overnight). After secondary antibody incubation (4 °C, overnight), embryos were incubated in 200 nM SYTOX Blue (Thermo Fisher) for 30 min at room temperature and rinsed four times with PBS 0.1% Tween-20. Remaining yolk and tails were removed, and the embryos were ventrally mounted in PBS 1.5% low-melt agarose. Primary antibodies were: rabbit anticonnexin-43 (Sigma C6219, 1:50), mouse anti-myosin 4 (Thermo 14-6503-82, 1:250). Secondary antibodies were: goat antirabbit AlexaFluor 633 conjugate (Thermo A-21070) and goat antimouse AlexaFluor 546 conjugate (Thermo A-11003), both applied 1:500.

In situ hybridization was performed with the hybridization chain reaction system (Molecular Instruments), as described by the manufacturer60. A custom probe set for myl7 was designed (Supplementary File 2) for the B1 initiator set, with AlexaFluor594-conjugated amplifier oligonucleotides.

Statistics and reproducibility

Plots were generated in Matplotlib. All boxplots represent IQR with whiskers representing 1.5× IQR. All numbers of independent repeats of experiments are shown alongside n values indicating the total number of individual animals. Sample size was determined by the technical demands of the experiments. Individual embryos are not distinguishable at the one-cell stage, and hence were randomly allocated into groups for injection. Sex of animals is not determined at the developmental stage of interest. The researchers were not blinded in this study.

Central tendencies in text are indicated as mean ± s.d. or median (IQR) unless stated otherwise. Statistical analysis was performed using the statannotations and scipy Python packages. The Shapiro–Wilk test for normality was performed on all datasets used for statistical comparisons (P > 0.05 for normally distributed data). For paired datasets, a two-tailed paired t-test was performed on normally distributed data, whereas a Wilcoxon signed-rank test was performed on non-normally distributed data. For unpaired datasets, a two-tailed unpaired t-test was performed on normally distributed data, whereas a Mann–Whitney–Wilcoxon test was performed on non-normally distributed data. Fitting of frequency and ISI coefficient of variation to simulations was performed with a joint mean-squared error approach (Supplementary Information).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.