We present the results of a detailed investigation of the prompt and afterglow emission in the High Energy Stereoscopic System(H.E.S.S.)-detected GRB190829A. Swift and Fermi observations of the prompt phase of this gamma-ray burst(GRB) reveal two isolated sub bursts or episodes, separated by a quiescent phase. The energetic and the spectral properties of the first episode are in stark contrast to the second. The first episode, which has a higher spectral peak∼120 keV and a low isotropic energy∼1050erg is an outlier to the Amati correlation and marginally satisfies the Yonetoku correlation. However, the energetically dominant second episode has lower peak energy and is consistent with the above correlations. We compared this GRB to other low-luminosity GRBs (LLGRBs). Prompt emission of LLGRBs also indicates a relativistic shock breakout origin of the radiation. For GRB190829A, some of the properties of a shock breakout origin are satisfied. However, the absence of an accompanying thermal component and energy above the shock breakout critical limit precludes a shock breakout origin. In the afterglow, an unusual long-lasting late-time flare of duration∼104s is observed. We also analyzed the late-time Fermi Large Area Telescope(LAT)emission that encapsulates the H.E.S.S. detection. Some of the LAT photons are likely to be associated with the source. All of the above observational facts suggest GRB190829A is a peculiar low-luminosity GRB that is not powered by a shock breakout, and has an unusual rebrightening due to patchy emission or a refreshed shock during the afterglow. Furthermore, our results show that teraelectronvolt-energy photons seem common in both high-luminosity GRBs and LLGRBs.